# ExternalSecret: Curio application database credentials.
# Infisical path to pre-populate:
#   CURIO_DATABASE_URL → postgres://postgres:<pass>@curio-db:5432/curio
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: curio-db-creds
  namespace: curio
  annotations:
    argocd.argoproj.io/sync-wave: "-1"
spec:
  refreshInterval: 1h
  secretStoreRef:
    name: infisical
    kind: ClusterSecretStore
  target:
    name: curio-db-creds
    creationPolicy: Owner
  data:
    - secretKey: DATABASE_URL
      remoteRef:
        key: CURIO_DATABASE_URL
