gitea:
  admin:
    username: "TheAdminUser"
    password: "AGoodPassword"
    email: "root@admin.ch"
  additionalConfigFromEnvs:
    - name: FORGEJO__DATABASE__USER
      valueFrom:
        secretKeyRef:
          name: postgres-creds
          key: POSTGRESQL_USER
    - name: FORGEJO__DATABASE__PASSWD
      valueFrom:
        secretKeyRef:
          name: postgres-creds
          key: POSTGRESQL_PASSWORD
    - name: FORGEJO__DATABASE__NAME
      valueFrom:
        secretKeyRef:
          name: postgres-creds
          key: POSTGRESQL_DB
    - name: POSTGRESQL_HOST
      valueFrom:
        secretKeyRef:
          name: postgres-creds
          key: POSTGRESQL_HOST
    - name: POSTGRESQL_PORT
      valueFrom:
        secretKeyRef:
          name: postgres-creds
          key: POSTGRESQL_PORT
    - name: FORGEJO__DATABASE__HOST
      value: "$(POSTGRESQL_HOST):$(POSTGRESQL_PORT)"
    - name: REDIS_HOST
      valueFrom:
        secretKeyRef:
          name: redis-creds
          key: REDIS_HOST
    - name: REDIS_PORT
      valueFrom:
        secretKeyRef:
          name: redis-creds
          key: REDIS_PORT
    - name: REDIS_USERNAME
      valueFrom:
        secretKeyRef:
          name: redis-creds
          key: REDIS_USERNAME
    - name: REDIS_PASSWORD
      valueFrom:
        secretKeyRef:
          name: redis-creds
          key: REDIS_PASSWORD
    - name: FORGEJO__CACHE__HOST
      value: "rediss://$(REDIS_USERNAME):$(REDIS_PASSWORD)@$(REDIS_HOST):$(REDIS_PORT)/0?pool_size=100&idle_timeout=180s&skipverify=true"
  config:
    database:
      DB_TYPE: postgres
      SSL_MODE: require
    log:
      LEVEL: "info"
    server:
      ROOT_URL: https://myforgejo.example.com
      DOMAIN: myforgejo.example.com
      DISABLE_SSH: true
      LFS_START_SERVER: true
      OFFLINE_MODE: true
      LANDING_PAGE: login
      MINIMUM_KEY_SIZE_CHECK: true
    repository:
      ROOT: /data/git/repositories
    lfs:
      PATH: /data/git/lfs
    service:
      DEFAULT_KEEP_EMAIL_PRIVATE: true
      ENABLE_NOTIFY_MAIL: true
      ALLOW_ONLY_EXTERNAL_REGISTRATION: true
    admin:
      SEND_NOTIFICATION_EMAIL_ON_NEW_USER: true
    cron:
      ENABLED: true
    mailer:
      ENABLED: false
    session:
      PROVIDER: db
    cache:
      ADAPTER: twoqueue
      HOST: '{"size":100, "recent_ratio":0.25, "ghost_ratio":0.5}'
    packages:
      LIMIT_SIZE_CONTAINER: "2 GiB"
    oauth2_client:
      UPDATE_AVATAR: true
    queue:
      TYPE: level
    cron.archive_cleanup:
      SCHEDULE: "@hourly"
      OLDER_THAN: "2h"
    indexer:
      ISSUE_INDEXER_TYPE: bleve
      REPO_INDEXER_ENABLED: true
    security:
      REVERSE_PROXY_TRUSTED_PROXIES: "*"
    metrics:
      ENABLED: true

global:
  compatibility:
    openshift:
      adaptSecurityContext: force

ingress:
  enabled: true
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production
  tls:
    - hosts:
        - myforgejo.example.com
      secretName: ingress-cert
  hosts:
    - host: myforgejo.example.com
      paths:
        - path: /
          pathType: Prefix

redis-cluster:
  enabled: false
redis:
  enabled: false
postgresql:
  enabled: false
postgresql-ha:
  enabled: false

persistence:
  enabled: true

strategy:
  type: "Recreate"
