# infrastructure/postgres/secretproviderclass.yaml
apiVersion: secrets-store.csi.x-k8s.io/v1
kind: SecretProviderClass
metadata:
  name: postgres-vault
  namespace: postgres
spec:
  provider: vault
  parameters:
    vaultAddress: "http://vault.vault.svc.cluster.local:8200"
    roleName: "postgres"
    objects: |
      - objectName: "postgres_password"
        secretPath: "kv/data/atlas/postgres/postgres-db"
        secretKey: "POSTGRES_PASSWORD"
