image:
  repository: tccr.io/truecharts/readarr
  pullPolicy: IfNotPresent
  tag: v0.1.4.1596@sha256:8228fb87ef5626392c481849a7f8d089e7ae16afc148da54e7ef0a1bd4669483
service:
  main:
    ports:
      main:
        port: 8787
persistence:
  config:
    enabled: true
    mountPath: /config
cnpg:
  main:
    enabled: true

    database: readarr
    user: readarr
portal:
  open:
    enabled: true
securityContext:
  container:
    readOnlyRootFilesystem: false
workload:
  main:
    podSpec:
      containers:
        main:
          probes:
            liveness:
              enabled: true
              ## Set this to true if you wish to specify your own livenessProbe
              custom: true
              ## The spec field contains the values for the default livenessProbe.
              ## If you selected custom: true, this field holds the definition of the livenessProbe.
              spec:
                exec:
                  command:
                    - /usr/bin/env
                    - bash
                    - -c
                    - curl --fail localhost:8787/api/v1/system/status?apiKey=`IFS=\> && while read -d \< E C; do if [[ $E = "ApiKey" ]]; then echo $C; fi; done < /config/config.xml`
                failureThreshold: 5
                initialDelaySeconds: 60
                periodSeconds: 10
                successThreshold: 1
                timeoutSeconds: 10
          env:
            READARR__PORT: "{{ .Values.service.main.ports.main.port }}"
            READARR__AUTHENTICATION_METHOD: ""
            READARR__POSTGRES_PORT: 5432
            READARR__POSTGRES_USER: "{{ .Values.cnpg.main.user }}"
            READARR__POSTGRES_MAIN_DB: "{{ .Values.cnpg.main.database }}"
            READARR__POSTGRES_HOST:
              secretKeyRef:
                name: cnpg-main-urls
                key: host
            READARR__POSTGRES_PASSWORD:
              secretKeyRef:
                name: cnpg-main-user
                key: password
