From 234356f297bc5b3a572591502792d54e47c3ca60 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Wed, 5 Apr 2023 01:33:08 +0000 Subject: [PATCH] updated yaml --- .../videohosting/templates/plex-sts.yaml | 79 +++++++++++ .../videohosting/templates/plex-svc.yaml | 46 +++++++ .../videohosting/templates/plex.yaml | 125 ------------------ 3 files changed, 125 insertions(+), 125 deletions(-) create mode 100644 k8s/applications/videohosting/templates/plex-sts.yaml create mode 100644 k8s/applications/videohosting/templates/plex-svc.yaml delete mode 100644 k8s/applications/videohosting/templates/plex.yaml diff --git a/k8s/applications/videohosting/templates/plex-sts.yaml b/k8s/applications/videohosting/templates/plex-sts.yaml new file mode 100644 index 0000000..103da2b --- /dev/null +++ b/k8s/applications/videohosting/templates/plex-sts.yaml @@ -0,0 +1,79 @@ +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: plex +spec: + selector: + matchLabels: + app: plex + serviceName: plex + replicas: 2 + revisionHistoryLimit: 2 + volumeClaimTemplates: + - metadata: + name: plex-config + spec: + accessModes: [ "ReadWriteMany" ] + resources: + requests: + storage: 8Gi + - metadata: + name: plex-transcode + spec: + accessModes: [ "ReadWriteMany" ] + resources: + requests: + storage: 8Gi + template: + metadata: + labels: + app: plex + spec: + containers: + - name: plex + image: "{{ .Values.plex.repo }}:{{ .Values.plex.tag }}" + 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 }} + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: TZ + value: America/Toronto + - name: ADVERTISE_IP + value: "https://plex.{{ .Values.global.domain }}" + volumes: + {{ range $k, $v := .Values.nfs.shares }} + - name: {{ $k }} + nfs: + server: "{{ $.Values.nfs.server }}" + path: "{{ $v }}" + readOnly: true + {{ end }} diff --git a/k8s/applications/videohosting/templates/plex-svc.yaml b/k8s/applications/videohosting/templates/plex-svc.yaml new file mode 100644 index 0000000..f76a799 --- /dev/null +++ b/k8s/applications/videohosting/templates/plex-svc.yaml @@ -0,0 +1,46 @@ +--- +kind: Service +apiVersion: v1 +metadata: + name: plex +spec: + selector: + app: plex + type: ClusterIP + ports: + - port: 32400 + targetPort: 32400 + name: plex + - port: 1900 + targetPort: 1900 + name: "1900" + protocol: UDP + - port: 3005 + targetPort: 3005 + name: "3005" + - port: 5353 + targetPort: 5353 + name: "5353" + protocol: UDP + - port: 8324 + targetPort: 8324 + name: "8324" + - port: 32410 + targetPort: 32410 + name: "32410" + protocol: UDP + - port: 32412 + targetPort: 32412 + name: "32412" + protocol: UDP + - port: 32413 + targetPort: 32413 + name: "32413" + protocol: UDP + - port: 32414 + targetPort: 32414 + name: "32414" + protocol: UDP + - port: 32469 + targetPort: 32469 + name: "32469" diff --git a/k8s/applications/videohosting/templates/plex.yaml b/k8s/applications/videohosting/templates/plex.yaml deleted file mode 100644 index 40902a0..0000000 --- a/k8s/applications/videohosting/templates/plex.yaml +++ /dev/null @@ -1,125 +0,0 @@ ---- -kind: Service -apiVersion: v1 -metadata: - name: plex -spec: - selector: - app: plex - type: ClusterIP - ports: - - port: 32400 - targetPort: 32400 - name: plex - - port: 1900 - targetPort: 1900 - name: "1900" - protocol: UDP - - port: 3005 - targetPort: 3005 - name: "3005" - - port: 5353 - targetPort: 5353 - name: "5353" - protocol: UDP - - port: 8324 - targetPort: 8324 - name: "8324" - - port: 32410 - targetPort: 32410 - name: "32410" - protocol: UDP - - port: 32412 - targetPort: 32412 - name: "32412" - protocol: UDP - - port: 32413 - targetPort: 32413 - name: "32413" - protocol: UDP - - port: 32414 - targetPort: 32414 - name: "32414" - protocol: UDP - - port: 32469 - targetPort: 32469 - name: "32469" ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: plex -spec: - selector: - matchLabels: - app: plex - serviceName: plex - replicas: 2 - revisionHistoryLimit: 2 - volumeClaimTemplates: - - metadata: - name: plex-config - spec: - accessModes: [ "ReadWriteMany" ] - resources: - requests: - storage: 8Gi - - metadata: - name: plex-transcode - spec: - accessModes: [ "ReadWriteMany" ] - resources: - requests: - storage: 8Gi - template: - metadata: - labels: - app: plex - spec: - containers: - - name: plex - image: "{{ .Values.plex.repo }}:{{ .Values.plex.tag }}" - 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 - {{ $k, $v := range .Values.nfs.shares }} - - name: {{ $k }} - mountPath: /mnt/{{ $k }} - {{ end }} - env: - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: TZ - value: America/Toronto - - name: ADVERTISE_IP - value: "https://plex.{{ .Values.global.domain }}" - volumes: - {{ $k, $v := range .Values.nfs.shares }} - - name: {{ $k }} - nfs: - server: "{{ $.Values.nfs.server }}" - path: "{{ $v }}" - readOnly: true - {{ end }}