# Forgejo reads SMTP credentials from the private railiance01 OpenBao service.
#
# Prereq: Secret external-secrets/openbao-forgejo-eso-token (key: token) with a
# policy-limited OpenBao token that can read platform/workloads/forgejo/forgejo-mailer.
# Bootstrap: railiance-apps make forgejo-openbao-eso-token-apply
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
metadata:
  name: openbao-forgejo
  labels:
    app.kubernetes.io/part-of: railiance-gitops
    railiance-platform/component: external-secrets
spec:
  provider:
    vault:
      server: http://openbao.openbao.svc:8200
      path: platform
      version: v2
      auth:
        tokenSecretRef:
          name: openbao-forgejo-eso-token
          namespace: external-secrets
          key: token
  conditions:
    - namespaces:
        - forgejo
