global:
  ingress:
    enabled: true
    className: nginx
    annotations:
      cert-manager.io/cluster-issuer: acme
      kubernetes.io/tls-acme: "true"
      nginx.ingress.kubernetes.io/ssl-redirect: "true"
    host: "camunda88-demo.k8s.amm.btc-ag.cloud"
    tls:
      enabled: true
      secretName: "camunda88-tls"

  elasticsearch:
    enabled: true
    external: false
    url:
      protocol: "http"
      port: 9200

  identity:
    auth:
      enabled: true
      publicIssuerUrl: "https://camunda88-demo.k8s.amm.btc-ag.cloud/auth/realms/camunda-platform"
      console:
        redirectUrl: "https://camunda88-demo.k8s.amm.btc-ag.cloud/console"
      webModeler:
        redirectUrl: "https://camunda88-demo.k8s.amm.btc-ag.cloud/modeler"
      optimize:
        redirectUrl: "https://camunda88-demo.k8s.amm.btc-ag.cloud/optimize"
      orchestration:
        redirectUrl: "https://camunda88-demo.k8s.amm.btc-ag.cloud/orchestration"
      connectors:
        secret:
          existingSecret: "ca-identity-secret-camunda88"
          existingSecretKey: "connectors-secret"

elasticsearch:
  enabled: true
  master:
    replicaCount: 1
  persistence:
    size: 20Gi

identity:
  enabled: true
  contextPath: /identity
  externalDatabase:
    enabled: true
    host: "postgres88.camunda8-8.svc.cluster.local"
    port: 5432
    database: "identity"
    username: "postgres"
    existingSecret: "ca-identity-secret-camunda88"
    existingSecretKey: "postgres-password"
  firstUser:
    secret:
      existingSecret: "ca-identity-secret-camunda88"
      existingSecretKey: "first-user-secret"

identityKeycloak:
  enabled: true
  ingress:
    enabled: true
    tls: true
  auth:
    existingSecret: "ca-identity-secret-camunda88"
    secretKeys:
      adminPasswordKey: "identity-keycloak-admin-password"
      userPasswordKey: "identity-keycloak-user-password"
  postgresql:
    enabled: false
  externalDatabase:
    host: "postgres88.camunda8-8.svc.cluster.local"
    port: 5432
    user: "postgres"
    database: "keycloak"
    existingSecret: "ca-identity-secret-camunda88"
    existingSecretPasswordKey: "postgres-password"

orchestration:
  enabled: true
  clusterSize: "1"
  partitionCount: "1"
  replicationFactor: "1"
  security:
    authentication:
      method: oidc
      oidc:
        redirectUrl: "https://camunda88-demo.k8s.amm.btc-ag.cloud/orchestration"
        secret:
          existingSecret: "ca-identity-secret-camunda88"
          existingSecretKey: "orchestration-secret"
  env:
    # Forces the internal Zeebe Gateway to start inside the unified pod
    - name: ZEEBE_BROKER_GATEWAY_ENABLE
      value: "true"
    - name: CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_URL
      value: "http://camunda-elasticsearch:9200"
  resources:
    requests:
      cpu: "1"
      memory: "2Gi"
    limits:
      cpu: "2"
      memory: "3Gi"

# DISABLE STANDALONE ZEEBE - It conflicts with Orchestration
zeebe:
  enabled: false

connectors:
  enabled: true
  env:
    # 8.8 Universal Client Config
    - name: CAMUNDA_CLIENT_MODE
      value: "self-managed"
    # Use HTTP (not grpc://) for the gateway address
    - name: CAMUNDA_CLIENT_GRPC_ADDRESS
      value: "http://camunda-zeebe-gateway:26500"
    - name: CAMUNDA_CLIENT_REST_ADDRESS
      value: "http://camunda-zeebe-gateway:8080"
    - name: CAMUNDA_CLIENT_IDENTITY_ISSUER_URL
      value: "https://camunda88-demo.k8s.amm.btc-ag.cloud/auth/realms/camunda-platform"
    - name: CAMUNDA_CLIENT_IDENTITY_CLIENT_ID
      value: "connectors"
    - name: CAMUNDA_CLIENT_IDENTITY_CLIENT_SECRET
      value: "camunda8"
    - name: ZEEBE_CLIENT_SECURITY_PLAINTEXT
      value: "true"

optimize:
  enabled: true
  contextPath: /optimize
  elasticsearch:
    host: "camunda-elasticsearch"
    port: 9200

webModeler:
  enabled: true
  contextPath: /modeler
  restapi:
    mail:
      fromAddress: "no-reply@example.com"
    externalDatabase:
      host: "postgres88.camunda8-8.svc.cluster.local"
      port: 5432
      database: "web-modeler"
      user: "postgres"
      secret:
        existingSecret: "ca-identity-secret-camunda88"
        existingSecretKey: "postgres-password"