# Huddo for HCL Connections Component Pack — huddo-cp
#
# Read every variable and replace the [PLACEHOLDERS] with your own values.
# For details of variable meanings see https://docs.huddo.com/huddo/cp/
# For the current chart version and install command see
# https://docs.huddo.com/huddo/helm-charts/
#
# The release name must be huddo-cp — the chart's default SOCKET_CLUSTER_HOST,
# huddo-cp-socketcluster-worker, derives from it.
#
# SECURITY: this file ends up holding credentials (OAuth client secret, JWT
# secret, licence key, S3 keys, SMTP password). Treat it as a secret: keep it
# out of source control, or supply the sensitive values with `helm --set` or
# from Kubernetes secrets via envArray, as shown for SOCKET_CLUSTER_SECRET.

global:
  imageTag: "[BIG_ENDIAN_DATE]" # e.g. '2026-08-07' — see https://docs.huddo.com/huddo/releases/
  # Name of the image pull secret you created from your Quay.io account — see
  # https://docs.huddo.com/huddo/images/
  imagePullSecret: "[PULL_SECRET_NAME]"
  # Only if you mirror our images. Chart default: quay.io/huddo
  # repository: my-registry.example.com/huddo
  # Uncomment to enable draw.io diagrams in Wikis — also uncomment the drawio
  # ingress block near the bottom of this file, both are needed.
  # drawio:
  #   enabled: true
  env:
    # Public URL of Huddo. The /huddo prefix is built into the images and cannot
    # be changed. Every app URL is derived from this.
    HUDDO_URI: https://[CONNECTIONS_HOST]/huddo
    # S3 credentials. These must match s3.accessKey / s3.secretKey at the
    # bottom of this file.
    S3_ACCESS_KEY: "[S3_ACCESS_KEY]"
    S3_SECRET_KEY: "[S3_SECRET_KEY]"

  # Shared secret signing the real-time (SocketCluster) connections, read from
  # a Kubernetes secret so it never sits in this file. Create it first:
  #   kubectl create secret generic socketcluster-secret \
  #     --from-literal=socketcluster-secret=$(openssl rand -base64 32) -n connections
  envArray:
    - name: SOCKET_CLUSTER_SECRET
      valueFrom:
        secretKeyRef:
          name: socketcluster-secret
          key: socketcluster-secret

# Products. Ideas, Wikis, Spaces and Search are deployed by default; Boards is not. Uncomment
# to change that — enable Boards only if you do NOT already run a separate
# huddo-boards-cp release.
# products:
#   ideas:
#     enabled: false
#   wikis:
#     enabled: false
#   spaces:
#     enabled: false
#   search:
#     enabled: false
#   boards:
#     enabled: true

# Deploy the shared user / provider / licence services. Set to false when an
# existing huddo-boards-cp release in THIS namespace already provides them.
# sharedServices:
#   deploy: false

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

attachments:
  ingress:
    hosts:
      - "[CONNECTIONS_HOST]"
    path: /huddo/attachments
    traefik:
      stripPrefix:
        enabled: true
        prefix: /huddo

discussions:
  ingress:
    hosts:
      - "[CONNECTIONS_HOST]"
    path: /huddo/discussions
    traefik:
      stripPrefix:
        enabled: true
        prefix: /huddo

notifications:
  ingress:
    hosts:
      - "[CONNECTIONS_HOST]"
    path: /huddo/notifications
    traefik:
      stripPrefix:
        enabled: true
        prefix: /huddo
  env:
    # Email delivery. Remove this block to leave outbound email disabled.
    EMAIL_HOST: "[SMTP_HOSTNAME]"
    # EMAIL_PORT: 587
    # EMAIL_USERNAME: '[SMTP_USERNAME]'
    # EMAIL_PASSWORD: '[SMTP_PASSWORD]'
    EMAIL_FROM: no-reply@[YOUR_DOMAIN]
    EMAIL_FROM_NAME: Huddo

ideas:
  ingress:
    hosts:
      - "[CONNECTIONS_HOST]"
    path: /huddo/ideas

wikis:
  ingress:
    hosts:
      - "[CONNECTIONS_HOST]"
    path: /huddo/wikis
  env:
    NEXT_PUBLIC_BASE_PATH: /huddo/wikis

# Huddo Spaces, the org-level container that groups many wikis.
spaces:
  ingress:
    hosts:
      - "[CONNECTIONS_HOST]"
    path: /huddo/spaces

# Cross-app search. Deployed by default; the query API lives under
# /huddo/search/api. See the OpenSearch block near the bottom of this file —
# the index needs storage before the first deploy.
search:
  ingress:
    hosts:
      - "[CONNECTIONS_HOST]"
    path: /huddo/search
    traefik:
      stripPrefix:
        enabled: true
        prefix: /huddo

editor:
  ingress:
    hosts:
      - "[CONNECTIONS_HOST]"
    path: /huddo/editor
    traefik:
      stripPrefix:
        enabled: true
        prefix: /huddo

user:
  env:
    # A random string of at least 32 characters, used to sign sessions
    JWT_SECRET: "[RANDOM_SECRET]"
    CONNECTIONS_URL: https://[CONNECTIONS_HOST]
    CONNECTIONS_CLIENT_ID: huddo
    CONNECTIONS_CLIENT_SECRET: "[CLIENT_SECRET]"
    CONNECTIONS_ADMINS: '["[ADMIN_EMAIL]"]'

licence:
  env:
    # Licence key from https://store.huddo.com
    LICENCE: "[LICENCE_KEY]"

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

# SeaweedFS S3 file storage. The chart ships development credentials, so these
# must be set, and must match the global.env.S3_ACCESS_KEY / S3_SECRET_KEY
# values above.
s3:
  accessKey: "[S3_ACCESS_KEY]"
  secretKey: "[S3_SECRET_KEY]"
  persistence:
    # Either an NFS export (see https://docs.huddo.com/huddo/cp/s3/) ...
    nfs:
      server: "[NFS_SERVER_IP]"
      path: /pv-connections/huddo-s3
    # ... or a dynamic provisioner — set storageClassName and blank the nfs
    # server/path above.
    # storageClassName: my-storage-class
    # size: 10Gi   # chart default

# OpenSearch index for cross-app search (products.search.enabled, on by
# default). A Connections cluster usually has no dynamic provisioner, so this
# follows the same NFS layout as the S3 volume above. Create the export BEFORE
# the first deploy — the chart's init container chowns it, it does not create
# it. To use a provisioner instead, set storageClassName and drop the nfs block.
opensearch:
  persistence:
    nfs:
      server: "[NFS_SERVER_IP]"
      path: /pv-connections/huddo-opensearch
    # storageClassName: my-storage-class
    # size: 20Gi   # chart default

# ---------------------------------------------------------------------------
# Optional: draw.io diagrams in Wikis — self-hosted, nothing leaves the cluster.
# See https://docs.huddo.com/huddo/env/chart/#diagrams-drawio
#
# Uncomment this block AND global.drawio at the top of this file — the switch
# alone advertises the feature without deploying the editor.
#
# Everything needed is below. Replace [CONNECTIONS_HOST] with the same host
# Wikis is served from (e.g. connections.example.com) and leave the rest as it
# is — the path must keep the /huddo prefix, because Wikis derives the editor
# URL from HUDDO_URI and so looks for /huddo/drawio.
# ---------------------------------------------------------------------------
# drawio:
#   ingress:
#     hosts:
#       - '[CONNECTIONS_HOST]'
#     path: /huddo/drawio

# ---------------------------------------------------------------------------
# Optional: WikiShift — migrate HCL Connections Wikis into Huddo Wikis.
# See https://docs.huddo.com/wikis/shift/
# ---------------------------------------------------------------------------
# wikishift:
#   enabled: true
#   ingress:
#     hosts:
#       - '[CONNECTIONS_HOST]'
#     path: /huddo/wikishift
#     traefik:
#       stripPrefix:
#         enabled: true
#         prefix: /huddo
#   # Extends the chart's mongo-secret volume with the Connections 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
#   env:
#     CNX_HOSTNAME: https://[CONNECTIONS_HOST]
#     DB2_HOSTNAME: '[DB2_HOSTNAME]'
#     DB2_DATABASE: WIKIS
#     DB2_PORT: 50000
#     DB2_UID: '[DB2_USER]'
#     DB2_PWD: '[DB2_PASSWORD]'
#     WIKIS_CONTENT_DIR: /data/wikis/upload

# ---------------------------------------------------------------------------
# Optional: Huddo Boards in this release (products.boards.enabled: true above).
# Only for customers WITHOUT an existing huddo-boards-cp release. Also set
# global.env.APP_URI / API_GATEWAY / URL_BOARDS to the Boards URLs.
# ---------------------------------------------------------------------------
# boards-core:
#   ingress:
#     hosts:
#       - '[CONNECTIONS_HOST]'
#     traefik:
#       stripPrefix:
#         enabled: true
#
# boards-webfront:
#   ingress:
#     hosts:
#       - '[CONNECTIONS_HOST]'
#     traefik:
#       stripPrefix:
#         enabled: true
