# yaml-language-server: $schema=./values.schema.json
image:
  repository: ghcr.io/tandoorrecipes/recipes
  pullPolicy: IfNotPresent
  tag: 2.6.1@sha256:22a93021d14c1f4b0f7a3eebac22f3cddba4328b7a43861630881a4008d09d8d
securityContext:
  container:
    readOnlyRootFilesystem: false
    runAsNonRoot: false
    runAsGroup: 0
    runAsUser: 0
workload:
  main:
    podSpec:
      initContainers:
        init-mkdir:
          enabled: true
          type: init
          imageSelector: "image"
          command:
            - /bin/sh
            - -c
          args:
            - mkdir -p /run/nginx
      containers:
        main:
          env:
            DB_ENGINE: django.db.backends.postgresql
            POSTGRES_HOST:
              secretKeyRef:
                name: cnpg-main-urls
                key: host
            POSTGRES_PORT: 5432
            POSTGRES_USER: "{{ .Values.cnpg.main.user }}"
            POSTGRES_PASSWORD:
              secretKeyRef:
                name: cnpg-main-user
                key: password
            POSTGRES_DB: "{{ .Values.cnpg.main.database }}"
            TANDOOR_PORT: "{{ .Values.service.main.ports.main.port }}"
            ALLOWED_HOSTS: "*"
            COMMENT_PREF_DEFAULT: 1
            CSRF_TRUSTED_ORIGINS: ""
            DEBUG: 0
            FRACTION_PREF_DEFAULT: 0
            GUNICORN_MEDIA: 0
            SECRET_KEY:
              secretKeyRef:
                key: SECRET_KEY
                name: recipes-secrets
            SHOPPING_MIN_AUTOSYNC_INTERVAL: 5

service:
  main:
    ports:
      main:
        port: 10029

ingress:
  main:
    integrations:
      homepage:
        widget:
          type: tandoor
persistence:
  media:
    enabled: true
    mountPath: /opt/recipes/mediafiles
  static:
    enabled: true
    mountPath: /opt/recipes/staticfiles
    type: emptyDir
cnpg:
  main:
    enabled: true
    user: recipes
    database: recipes
