move ovh cert-manager secret to vault

This commit is contained in:
2025-05-17 23:12:42 +02:00
parent 8251d8088a
commit f670536eeb
4 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ovh-credentials
namespace: cert-manager
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultAuth
metadata:
name: cert-manager
namespace: cert-manager
spec:
method: kubernetes
mount: kubernetes
kubernetes:
role: cert-manager
serviceAccount: ovh-credentials
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultStaticSecret
metadata:
name: webhook-ovh-credentials
namespace: cert-manager
spec:
type: kv-v2
mount: secret
path: ovh-cert-manager
destination:
create: true
name: ovh-credentials
type: Opaque
transformation:
excludeRaw: true
vaultAuthRef: cert-manager

View File

@@ -20,3 +20,4 @@ resources:
- configs/single-hdd-sc.yaml
- configs/mayastor-snapshotclass.yaml
- configs/openbao-cert.yaml
- configs/ovh-cert-manager-secret.yaml

View File

@@ -0,0 +1,6 @@
bound_service_account_names:
- ovh-credentials
bound_service_account_namespaces:
- cert-manager
token_policies:
- ovh-credentials

View File

@@ -0,0 +1,3 @@
path "secret/data/ovh-cert-manager" {
capabilities = ["read"]
}