#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/k8s-at-home/charts/tree/master/charts/common/values.yaml
#

image:
  repository: miniflux/miniflux
  # @default -- chart.appVersion
  tag:
  pullPolicy: IfNotPresent

# -- environment variables. See [miniflux docs](https://miniflux.app/docs/configuration.html) for more details.
# @default -- See below
env:
  # -- Set the container timezone.
  TZ: UTC
  # -- Postgresql connection parameters. See [lib/pq](https://pkg.go.dev/github.com/lib/pq#hdr-Connection_String_Parameters) for more details.
  DATABASE_URL: postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ include "common.names.fullname" .}}-postgresql/{{ .Values.postgresql.auth.database }}?sslmode=disable
  # -- Set to `1` to run database migrations during application startup.
  RUN_MIGRATIONS: '1'
  # -- Set to `1` to create an admin user from environment variables.
  CREATE_ADMIN: '1'
  # -- Admin user login, it's used only if `CREATE_ADMIN` is enabled.
  ADMIN_USERNAME: admin
  # -- Admin user password, it's used only if `CREATE_ADMIN` is enabled.
  ADMIN_PASSWORD: changeme

# -- Configures service settings for the chart.
# @default -- See values.yaml
service:
  main:
    ports:
      http:
        port: 8080

ingress:
  # -- Enable and configure ingress settings for the chart under this key.
  # @default -- See values.yaml
  main:
    enabled: false

# -- Configures the probes for the main Pod.
# @default -- See values.yaml
probes:
  liveness:
    enabled: true
    custom: true
    spec:
      initialDelaySeconds: 30
      periodSeconds: 10
      timeoutSeconds: 1
      failureThreshold: 3
      httpGet:
        path: /healthcheck
        port: 8080

# -- Enable and configure postgresql database subchart under this key.
#    For more options see [postgresql chart documentation](https://github.com/bitnami/charts/tree/master/bitnami/postgresql)
# @default -- Enabled (see values.yaml for more details)
postgresql:
  # -- By default uses an internal postgress. Dissable if you use your own Postgres.
  enabled: true
  auth:
    # -- Postgres database user name
    username: miniflux
    # -- Postgres database password
    password: "miniflux"
    # -- Postgres database
    database: miniflux
  persistence:
    enabled: false
