version: 1
kind: platform-infra-temporal

metadata:
  id: temporal-shared
  owner: platform-infra
  relatedIssues:
    - 2358
    - 2374

defaults:
  targetId: NC01

images:
  server: temporalio/auto-setup:1.28.1
  ui: temporalio/ui:2.52.1
  authProxy: caddy:2.10.2-alpine
  pullPolicy: IfNotPresent

targets:
  - id: NC01
    route: NC01:k3s
    namespace: temporal
    createNamespace: true
    enabled: true

database:
  configRef: config/platform-db/postgres-nc01.yaml
  sourceRef: platform-db/temporal-nc01-db.env
  sourceKeys:
    user: TEMPORAL_DB_USER
    password: TEMPORAL_DB_PASSWORD
    database: TEMPORAL_DB_NAME
    visibilityDatabase: TEMPORAL_VISIBILITY_DB_NAME
  host: 10.42.0.1
  port: 5432
  sslMode: require
  disableHostVerification: true
  skipCreate: true
  secretName: temporal-database

runtime:
  server:
    deploymentName: temporal
    serviceName: temporal-frontend
    replicas: 1
    frontendPort: 7233
    dynamicConfigFilePath: /etc/temporal/config/dynamicconfig/docker.yaml
    enableServiceLinks: false
  ui:
    deploymentName: temporal-ui
    serviceName: temporal-ui
    replicas: 1
    port: 8080
    enableServiceLinks: false
    auth:
      username: admin
      proxyPort: 8081
      secretName: temporal-web-admin
      passwordKey: password
  logicalNamespaces:
    - name: unidesk
      retention: 7d
  rolloutTimeoutSeconds: 300

publicExposure:
  enabled: true
  publicBaseUrl: https://temporal.hwpod.com
  hostname: temporal.hwpod.com
  upstream: http://temporal-ui.temporal.svc.cluster.local:8080
  healthPath: /healthz
  expectedA: 152.53.229.148

webProbe:
  enabled: true
  productId: temporal
  runner:
    node: NC01
    lane: v03
  origin:
    browserProxyMode: direct
  authentication:
    mode: basic-auth
    path: /namespaces/unidesk/workflows
    authenticatedSelector: body
    credentials:
      configRef: config/secrets-distribution.yaml
      targetId: temporal-nc01
      secretName: temporal-web-admin
      passwordTargetKey: password
  defaultSmokeProfile: admin-readonly
  smokeProfiles:
    admin-readonly:
      path: /namespaces/unidesk/workflows
      readySelector: body
      minimumBodyTextBytes: 32
      screenshotName: temporal-admin-readonly.png
      viewport:
        width: 1920
        height: 1080
      navigationTimeoutMs: 30000
      settleMs: 1000
      commandTimeoutSeconds: 120
      outputLimits:
        failures: 8
        network: 24
        console: 12
