image:
  repository: tccr.io/truecharts/handbrake
  tag: v1.25.1@sha256:89920e1a3bd1cd94487f43113f08e28ec6a00bad08b573032c69ee40abe50ff1
  pullPolicy: IfNotPresent

securityContext:
  readOnlyRootFilesystem: false
  runAsNonRoot: false

podSecurityContext:
  runAsUser: 0
  runAsGroup: 0

service:
  main:
    ports:
      main:
        port: 10053
        targetPort: 5800
  vnc:
    enabled: true
    ports:
      vnc:
        enabled: true
        port: 10055
        targetPort: 5900

envFrom:
  - configMapRef:
      name: '{{ include "tc.common.names.fullname" . }}-handbrake'

secretEnv:
  VNC_PASSWORD: ""

handbrake:
  KEEP_APP_RUNNING: false
  DISPLAY_WIDTH: 1280
  DISPLAY_HEIGHT: 768
  SECURE_CONNECTION: false
  ENABLE_CJK_FONT: false
  AUTOMATED_CONVERSION_PRESET: "General/Very Fast 1080p30"
  AUTOMATED_CONVERSION_FORMAT: "mp4"
  AUTOMATED_CONVERSION_KEEP_SOURCE: true
  AUTOMATED_CONVERSION_NON_VIDEO_FILE_ACTION: "ignore"

configmap:
  handbrake:
    enabled: true
    data:
      ENABLE_CJK_FONT: "{{ ternary \"1\" \"0\" .Values.handbrake.ENABLE_CJK_FONT }}"
      KEEP_APP_RUNNING: "{{ ternary \"1\" \"0\" .Values.handbrake.KEEP_APP_RUNNING }}"
      SECURE_CONNECTION: "{{ ternary \"1\" \"0\" .Values.handbrake.SECURE_CONNECTION }}"
      DISPLAY_WIDTH: "{{ .Values.handbrake.DISPLAY_WIDTH }}"
      DISPLAY_HEIGHT: "{{ .Values.handbrake.DISPLAY_HEIGHT }}"
      AUTOMATED_CONVERSION_KEEP_SOURCE: "{{ ternary \"1\" \"0\" .Values.handbrake.AUTOMATED_CONVERSION_KEEP_SOURCE }}"
      AUTOMATED_CONVERSION_PRESET: "{{ .Values.handbrake.AUTOMATED_CONVERSION_PRESET }}"
      AUTOMATED_CONVERSION_FORMAT: "{{ .Values.handbrake.AUTOMATED_CONVERSION_FORMAT }}"
      AUTOMATED_CONVERSION_NON_VIDEO_FILE_ACTION: "{{ .Values.handbrake.AUTOMATED_CONVERSION_NON_VIDEO_FILE_ACTION }}"

persistence:
  config:
    enabled: true
    mountPath: "/config"
  storage:
    enabled: true
    mountPath: "/storage"
  output:
    enabled: true
    mountPath: "/output"
