# CCR-2026-0012. Deploy on railiance01 (first consumer lives in
# databases), not the CoulombCore ArgoCD kustomization.
#
# Prereq: Secret external-secrets/openbao-backup-object-storage-approle
# (role-id, secret-id) for AppRole external-secrets-backup-object-storage.
# Same-cluster Kubernetes auth remains the follow-up.
# Add further namespace conditions when another backup consumer is bound.
apiVersion: external-secrets.io/v1
kind: ClusterSecretStore
metadata:
  name: openbao-backup-object-storage
  labels:
    app.kubernetes.io/part-of: railiance-gitops
    railiance-platform/component: external-secrets
    app.kubernetes.io/name: backup-object-storage
spec:
  provider:
    vault:
      server: http://openbao.openbao.svc:8200
      path: platform
      version: v2
      auth:
        appRole:
          path: approle
          roleRef:
            name: openbao-backup-object-storage-approle
            namespace: external-secrets
            key: role-id
          secretRef:
            name: openbao-backup-object-storage-approle
            namespace: external-secrets
            key: secret-id
  conditions:
    - namespaces:
        - databases
