# Please read every variable and replace with appropriate value
# For details of variable meanings, please see https://docs.huddo.com/collab/cp/

global:
  repository: quay.io/huddo
  imagePullSecret: quay
  imageTag: collab-[BIG_ENDIAN_DATE] # e.g. collab-2026-03-12
  env:
    APP_URI: https://[YOUR_HOSTNAME]/huddo
    PATH_EDITOR: /huddo/editor
    MONGO_CERT_USER: kudos-boards
    S3_ENDPOINT: [S3_SERVICE_HOSTNAME]
    S3_ACCESS_KEY: [S3_ACCESS_KEY]
    S3_SECRET_KEY: [S3_SECRET_KEY]
    # These secrets should be changed from chart defaults for production
    SOCKET_CLUSTER_SECRET: [RANDOM_SECRET]

core:
  ingress:
    hosts:
      - "[YOUR_HOSTNAME]"
    path: /huddo

attachments:
  ingress:
    hosts:
      - "[YOUR_HOSTNAME]"
    annotations:
      nginx.ingress.kubernetes.io/rewrite-target: /attachments/$1
    path: /huddo/attachments/?(.*)
    pathType: ImplementationSpecific
  env: []

discussions:
  ingress:
    hosts:
      - "[YOUR_HOSTNAME]"
    annotations:
      nginx.ingress.kubernetes.io/rewrite-target: /discussions/$1
    path: /huddo/discussions/?(.*)
    pathType: ImplementationSpecific
  env: []

ideas:
  ingress:
    hosts:
      - "[YOUR_HOSTNAME]"
    path: /huddo/ideas/?(.*)
    pathType: ImplementationSpecific
  env: []

wikis:
  ingress:
    hosts:
      - "[YOUR_HOSTNAME]"
    path: /huddo/wikis/?(.*)
    pathType: ImplementationSpecific
  env:
    API_PAGES_ENABLE_PURGE: true
    NEXT_PUBLIC_BASE_PATH: /huddo/wikis

editor:
  ingress:
    hosts:
      - "[YOUR_HOSTNAME]"
    path: /huddo/editor
    annotations:
      nginx.ingress.kubernetes.io/rewrite-target: /

user:
  env:
    MONGO_DB: boards-user # shares the same DB as boards user service
    CONNECTIONS_CLIENT_ID: [CLIENT_ID]
    CONNECTIONS_CLIENT_SECRET: [CLIENT_SECRET]
    CONNECTIONS_ADMINS: '["[ADMIN_EMAIL]"]'
    CONNECTIONS_URL: https://[CONNECTIONS_URL]

licence: {}

socketcluster:
  ingress:
    hosts:
      - "[YOUR_HOSTNAME]"

# This section is for deploying the optional WikiShift migration chart
wikishift:
  ingress:
    hosts:
      - "[YOUR_HOSTNAME]"
    annotations:
      nginx.ingress.kubernetes.io/rewrite-target: /wikishift/$1
    path: /huddo/wikishift/?(.*)
    pathType: ImplementationSpecific
  # Extends the chart's mongo-secret volume with the NFS shared drive
  volumes:
    - name: mongo-secret-vol
      secret:
        secretName: mongo-secret
        defaultMode: 420
    - name: shared-drive
      nfs:
        server: [NFS_SERVER_IP]
        path: /nfs/data/shared
  volumeMounts:
    - name: mongo-secret-vol
      mountPath: /etc/mongodb/x509
    - name: shared-drive
      mountPath: /data
  # Extends the chart's connections-env envArray with DB2 credentials
  envArray:
    - name: CONNECTIONS_HOSTNAME
      valueFrom:
        configMapKeyRef:
          name: connections-env
          key: ic-host
    - name: MONGO_HOSTNAME
      valueFrom:
        configMapKeyRef:
          name: connections-env
          key: mongo-name
          optional: true
    - name: MONGO_REPLICA_SET_NAME
      valueFrom:
        configMapKeyRef:
          name: connections-env
          key: mongo-rs-name
    - name: REDIS_CACHE_HOST
      valueFrom:
        configMapKeyRef:
          name: connections-env
          key: redis-node-service-name
    - name: REDIS_CACHE_PORT
      valueFrom:
        configMapKeyRef:
          name: connections-env
          key: redis-node-service-port
    - name: REDIS_CACHE_PASSWORD
      valueFrom:
        secretKeyRef:
          name: redis-secret
          key: secret
    - name: REDIS_CACHE_OPTIONS
      valueFrom:
        configMapKeyRef:
          name: connections-env
          key: redis-options
    - name: DB2_UID
      valueFrom:
        secretKeyRef:
          name: wikishift-db2
          key: uid
    - name: DB2_PWD
      valueFrom:
        secretKeyRef:
          name: wikishift-db2
          key: pwd
  env:
    CNX_HOSTNAME: https://[CONNECTIONS_URL]
    DB2_HOSTNAME: [DB2_HOSTNAME]
    DB2_DATABASE: WIKIS
    DB2_PORT: 50000
    # CONCURRENCY_SQL: 10
    CONCURRENCY_WIKIS: 1
    # CONCURRENCY_PAGES_PER_WIKI: 4
    # CONCURRENCY_FILES_PER_WIKI: 2
    # CONCURRENCY_COMMENTS_PER_WIKI: 8
    WIKIS_CONTENT_DIR: /data/wikis/upload
    # PURGE_MIGRATED_IDS: [WIKI_ID_1],[WIKI_ID_2]
    # IMMEDIATELY_MIGRATE_IDS: [WIKI_ID_1],[WIKI_ID_2]
