# ExternalSecret: Temporal Postgres credentials.
# Synced into Secret "temporal-db-creds" in namespace ai-core.
# Infisical paths to pre-populate:
#   TEMPORAL_DB_PASSWORD  → password for the agentic_os Postgres user
# The helm-values.yaml references this secret via extraEnv.
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: temporal-db-creds
  namespace: ai-core
  annotations:
    argocd.argoproj.io/sync-wave: "-1"
spec:
  refreshInterval: 1h
  secretStoreRef:
    name: infisical
    kind: ClusterSecretStore
  target:
    name: temporal-db-creds
    creationPolicy: Owner
  data:
    - secretKey: password
      remoteRef:
        key: TEMPORAL_DB_PASSWORD
