From 1e38118df86fc0260803eae2f20e3fcf4aa9b384 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Wed, 5 Apr 2023 01:50:04 +0000 Subject: [PATCH] updated configmap --- .../templates/plex-configmap.yaml | 10 +++ .../videohosting/templates/plex-deploy.yaml | 69 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 k8s/applications/videohosting/templates/plex-configmap.yaml create mode 100644 k8s/applications/videohosting/templates/plex-deploy.yaml diff --git a/k8s/applications/videohosting/templates/plex-configmap.yaml b/k8s/applications/videohosting/templates/plex-configmap.yaml new file mode 100644 index 0000000..641074a --- /dev/null +++ b/k8s/applications/videohosting/templates/plex-configmap.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: plex-envs +data: + PUID: "1000" + PGID: "1000" + TZ: America/Toronto + ADVERTISE_IP: "https://plex.{{ .Values.global.domain }}" diff --git a/k8s/applications/videohosting/templates/plex-deploy.yaml b/k8s/applications/videohosting/templates/plex-deploy.yaml new file mode 100644 index 0000000..9e61814 --- /dev/null +++ b/k8s/applications/videohosting/templates/plex-deploy.yaml @@ -0,0 +1,69 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: plex +spec: + selector: + matchLabels: + app: plex + replicas: 1 + revisionHistoryLimit: 2 + template: + metadata: + labels: + app: plex + spec: + containers: + - name: plex + image: "{{ .Values.plex.repo }}:{{ .Values.plex.tag }}" + resources: + limits: + cpu: 2 + memory: "2Gi" + requests: + cpu: 1 + memory: "500M" + ports: + - containerPort: 32400 + name: plex + - containerPort: 1900 + protocol: UDP + - containerPort: 3005 + - containerPort: 5353 + protocol: UDP + - containerPort: 8324 + - containerPort: 32410 + protocol: UDP + - containerPort: 32412 + protocol: UDP + - containerPort: 32413 + protocol: UDP + - containerPort: 32414 + protocol: UDP + - containerPort: 32469 + volumeMounts: + - name: plex-config + mountPath: /config + - name: plex-transcode + mountPath: /transcode + {{ range $k, $v := .Values.nfs.shares }} + - name: {{ $k }} + mountPath: /mnt/{{ $k }} + {{ end }} + envFrom: + - configMapRef: plex-envs + volumes: + - name: plex-config + persistentVolumeClaim: + claimName: plex-config + - name: plex-transcode + persistentVolumeClaim: + claimName: plex-transcode + {{ range $k, $v := .Values.nfs.shares }} + - name: {{ $k }} + nfs: + server: "{{ $.Values.nfs.server }}" + path: "{{ $v }}" + readOnly: true + {{ end }}