# yaml-language-server: $schema=./values.schema.json
image:
  repository: oci.trueforge.org/containerforge/airsonic-advanced
  tag: "11.1.4@sha256:04d26ae804a22e6933da73df4fd83c8e8a529586443955161cea87453a30448d"
  pullPolicy: IfNotPresent

securityContext:
  container:
    readOnlyRootFilesystem: false

service:
  main:
    ports:
      main:
        port: 4040
        protocol: http

workload:
  main:
    podSpec:
      containers:
        main:
          probes:
            liveness:
              type: tcp
            readiness:
              type: tcp
            startup:
              type: tcp
          env:
            AIRSONIC_PORT: "{{ .Values.service.main.ports.main.port }}"
            # dont expose to GUI
            CONTEXT_PATH: "/"
            # Set so the persisted dirs use the root path
            AIRSONIC_DIR: "/"
            # -- For passing additional java options. For some reverse proxies, you may need to pass `JAVA_OPTS=-Dserver.use-forward-headers=true` for airsonic to generate the proper URL schemes.
            JAVA_OPTS: ""
            spring_liquibase_parameters_userTableQuote: '"'
            spring_datasource_username: "{{ .Values.cnpg.main.user }}"
            spring_datasource_url:
              secretKeyRef:
                name: cnpg-main-urls
                key: jdbc
            spring_datasource_password:
              secretKeyRef:
                name: cnpg-main-user
                key: password

# Enabled postgres
cnpg:
  main:
    enabled: true
    user: airsonic-advanced
    database: airsonic-advanced

persistence:
  config:
    enabled: true
    mountPath: /airsonic
  music:
    enabled: true
    mountPath: /music
  podcasts:
    enabled: true
    mountPath: /podcasts
  playlists:
    enabled: true
    mountPath: /playlists
  varrun:
    enabled: false
