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

image:
  # -- Caddy reverse proxy image and tag
  repository: caddy
  # -- vikunja api image tag
  tag: 2.4.2-alpine
  # vikunja api image pull policy
  pullPolicy: IfNotPresent

caddy:
  # -- Disable auto tls if behind another loadbalancer or ingress
  noTls: false

vikunja:
  # -- Provide Vikunja config as YAML string
  config: |-
    service:
      jwtsecret: "myVeryComplexJWTSecret"

# -- 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

additionalContainers:
  # -- Set up the vikunja API container.
  # @default -- See values.yaml
  api:
    name: api
    # -- Vikunja api image and tag
    image: vikunja/api:0.17.1
    imagePullPolicy: IfNotPresent
    # -- You can declare most Vikunja parameters as environment variables.
    # Please consult https://vikunja.io/docs/config-options/ to see all parameters.
    # Note that parameters that are an array cannot be defined as environment variables (like the OpenID Connect settings). Use the vikunja.config Value for that.
    # @default -- See below
    env: []
      # - name: VIKUNJA_SERVICE_JWTSECRET
      #   value: myVeryComplexJWTSecret
      # - name: VIKUNJA_DATABASE_TYPE
      #   value: "postgres"
      # - name: VIKUNJA_DATABASE_HOST
      #   value: db
      # - name: VIKUNJA_DATABASE_DATABASE
      #   value: vikunja
      # - name: VIKUNJA_DATABASE_USER
      #   value: "vikunja"
      # - name: VIKUNJA_DATABASE_PASSWORD
      #   value: password
    volumeMounts:
      - name: vikunja-config
        mountPath: /etc/vikunja/config.yml
        subPath: Vikunja.yaml
      # - name: files
      #   mountPath: /app/vikunja/files

  # -- Set up the vikunja frontend container.
  # @default -- See values.yaml
  frontend:
    name: frontend
    # -- Vikunja frontend image and tag
    image: vikunja/frontend:0.17.0
    imagePullPolicy: IfNotPresent

# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence:
# -- Volume used for static files
  files:
    enabled: false
    mountpath: /app/vikunja/files
