image:
  repository: tccr.io/truecharts/gamevault-backend
  pullPolicy: IfNotPresent
  tag: 2.0.0@sha256:1cde674b30dc9abc8ff5958f1cd0bce4382ba65f64bb33fdce35c5a8c12641f6

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

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

workload:
  main:
    podSpec:
      containers:
        main:
          probes:
            liveness:
              path: /api/v1/health
              type: http
            readiness:
              path: /api/v1/health
              type: http
            startup:
              path: /api/v1/health
              type: http
          env:
            SERVER_PORT: "{{ .Values.service.main.ports.main.port }}"
            # manually set and change to /games so its easy for users to know where to place their game files.
            VOLUMES_FILES: /games
            VOLUMES_IMAGES: /images
            VOLUMES_LOG: /logs
            # DB
            DB_SYSTEM: POSTGRESQL
            DB_PORT: 5432
            DB_HOST:
              secretKeyRef:
                name: cnpg-main-urls
                key: host
            DB_DATABASE: "{{ .Values.cnpg.main.database }}"
            DB_USERNAME: "{{ .Values.cnpg.main.user }}"
            DB_PASSWORD:
              secretKeyRef:
                name: cnpg-main-user
                key: password
            # ADMIN
            SERVER_ADMIN_USERNAME: "admin"
            SERVER_ADMIN_PASSWORD: "password"
            SERVER_REGISTRATION_DISABLED: true
            SERVER_ACCOUNT_ACTIVATION_DISABLED: false
            # SERVER
            SERVER_LOG_LEVEL: info
            SERVER_CORS_ALLOWED_ORIGINS: "*"
            # GAMES
            GAMES_INDEX_INTERVAL_IN_MINUTES: 5
            # IMAGES
            IMAGE_GC_KEEP_DAYS: 30
            IMAGE_GC_INTERVAL_MINUTES: 60
            # RAWG
            RAWG_API_URL: https://api.rawg.io/api
            RAWG_API_CACHE_DAYS: 7
            # RAWG_API_KEY: ""

persistence:
  logs:
    enabled: true
    mountPath: /logs
  images:
    enabled: true
    mountPath: /images
  games:
    enabled: true
    mountPath: /games

cnpg:
  main:
    enabled: true
    user: gamevault
    database: gamevault

portal:
  open:
    enabled: true
