apiVersion: apps/v1
kind: Deployment
metadata:
  name: emby
  namespace: media
  labels:
    app: emby
spec:
  selector:
    matchLabels:
      app: emby
  template:
    metadata:
      labels:
        app: emby
    spec:
      automountServiceAccountToken: false
      securityContext:
        fsGroup: 0
        seccompProfile:
          type: RuntimeDefault
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: beta.kubernetes.io/arch
                    operator: In
                    values:
                      - amd64
      containers:
      - name: emby
        image: linuxserver/emby:beta-version-4.7.0.3
        securityContext:
          # runAsUser: 10000
          # runAsGroup: 30000
          allowPrivilegeEscalation: false
        ports:
        - name: https
          containerPort: 8920
          protocol: TCP
        - name: http
          containerPort: 8096
          protocol: TCP
        env:
          - name: PUID
            value: "10000"
          - name: PGID
            value: "30000"
        volumeMounts:
          - name: data
            mountPath: /config
            subPath: "configs/emby/config"
            readOnly: false
          - name: data
            mountPath: /mnt/share
            readOnly: false
        resources:
          limits:
            memory: 12000Mi
            cpu: 6
          requests:
            memory: 100Mi
            cpu: 100m
      volumes:
        - name: data
          persistentVolumeClaim:
              claimName: media