# yaml-language-server: $schema=./values.schema.json
image:
  repository: ghcr.io/rommapp/romm
  pullPolicy: IfNotPresent
  tag: 4.8@sha256:f9b16eb4fc939034205549b12b954769b6e1d82a5c0877b6fb19a294056669b0

securityContext:
  container:
    readOnlyRootFilesystem: false
    runAsNonRoot: false
    runAsUser: 0
    runAsGroup: 0

service:
  main:
    ports:
      main:
        protocol: http
        targetPort: 8080
        port: 10680

workload:
  main:
    podSpec:
      containers:
        main:
          probes:
            liveness:
              type: http
            readiness:
              type: http
            startup:
              type: http
          env:
            # dont touch!
            ROMM_BASE_PATH: /romm

            ROMM_HOST: localhost

            # IGDB client id and secret (not required but recommended to set)
            IGDB_CLIENT_ID: ""
            IGDB_CLIENT_SECRET: ""

            # optional api
            # STEAMGRIDDB_API_KEY: ""

            # paid API only (optional)
            # MOBYGAMES_API_KEY: ""

            # Disables playing in browser with EmulatorJS (builtin)
            # DISABLE_EMULATOR_JS: false

            # Disables playing flash games with RuffleRS (builtin)
            # DISABLE_RUFFLE_RS: false

            # Disables CSRF protection (not recommended)
            # DISABLE_CSRF_PROTECTION: false

            # Disable auth on download endpoint (WebRcade, Tinfoil)
            # DISABLE_DOWNLOAD_ENDPOINT_AUTH: false

            # Timeout for the background scan/rescan tasks (in seconds)
            # SCAN_TIMEOUT: 14400

            # Enable rescanning of library when filesystem changes
            # ENABLE_RESCAN_ON_FILESYSTEM_CHANGE: false

            # Delay in minutes before rescanning library when filesystem changes
            # RESCAN_ON_FILESYSTEM_CHANGE_DELAY: 5

            # Cron expression for scheduled rescanning
            # SCHEDULED_RESCAN_CRON: "0 3 * * *"

            # Enable scheduled updating of Switch TitleDB index
            # ENABLE_SCHEDULED_UPDATE_SWITCH_TITLEDB: false

            # Cron expression for scheduled updating of Switch TitleDB
            # SCHEDULED_UPDATE_SWITCH_TITLEDB_CRON: "0 4 * * *"

            # Enable scheduled updating of MAME XML index
            # ENABLE_SCHEDULED_UPDATE_MAME_XML: false

            # Cron expression for scheduled updating of MAME XML
            # SCHEDULED_UPDATE_MAME_XML_CRON: "0 5 * * *"

            DB_PORT: 3306
            DB_NAME: "{{ .Values.mariadb.mariadbDatabase }}"
            DB_USER: "{{ .Values.mariadb.mariadbUsername }}"
            DB_HOST:
              secretKeyRef:
                expandObjectName: false
                name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}'
                key: plainhost
            DB_PASSWD: "{{ .Values.mariadb.password }}"
            REDIS_HOST:
              secretKeyRef:
                expandObjectName: false
                name: '{{ printf "%s-%s" .Release.Name "rediscreds" }}'
                key: plainhost
            REDIS_PASSWORD: "{{ .Values.redis.password }}"
            REDIS_PORT: 6379
            ROMM_AUTH_SECRET_KEY:
              secretKeyRef:
                name: romm-secrets
                key: ROMM_AUTH_SECRET_KEY

persistence:
  library:
    enabled: true
    mountPath: /romm/library
  resources:
    enabled: true
    mountPath: /romm/resources
  config:
    enabled: true
    mountPath: /romm/config
  assets:
    enabled: true
    mountPath: /romm/assets

mariadb:
  enabled: true
  mariadbUsername: romm
  mariadbDatabase: romm

redis:
  enabled: true
