apiVersion: apps/v1
kind: Deployment
metadata:
  name: plex
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: plex
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: plex
    helm.sh/chart: plex-4.6.2
  namespace: plex
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: plex
      app.kubernetes.io/instance: plex
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: plex
        app.kubernetes.io/name: plex
    spec:
      enableServiceLinks: false
      serviceAccountName: default
      automountServiceAccountToken: true
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - env:
            - name: TZ
              value: US/Central
            - name: VERSION
              value: docker
          image: ghcr.io/linuxserver/plex:1.43.0@sha256:66c6a46ec3dc244aea20508b49dce4b46291c2fd2dba8851117e675d1c5dd52d
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            limits:
              gpu.intel.com/i915: 1
            requests:
              cpu: 10m
              gpu.intel.com/i915: 1
              memory: 512Mi
          volumeMounts:
            - mountPath: /config
              name: config
            - mountPath: /mnt/store
              name: media
              readOnly: true
            - mountPath: /transcode
              name: transcode
      volumes:
        - name: config
          persistentVolumeClaim:
            claimName: plex-config
        - name: media
          persistentVolumeClaim:
            claimName: plex-nfs-storage
        - emptyDir: {}
          name: transcode
