add vault auth for encapi
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful

encapi (the new Postgres-backed Puppet ENC replacing Cobbler) runs in k8s and
reads its secrets from Vault via the Kubernetes auth backend. Grant its pods
that access, mirroring artifactapi.

- add k8s auth role encapi (binds SA default in namespace encapi, mount k8s/au/syd1)
- add vault policy kv/service/encapi/environment/read
- add vault policy kv/service/encapi/postgres-password/read
This commit is contained in:
2026-07-04 23:26:35 +10:00
parent 36d7afbb65
commit 4f4182cb18
3 changed files with 27 additions and 0 deletions
@@ -0,0 +1,7 @@
bound_service_account_names:
- default
bound_service_account_namespaces:
- encapi
token_ttl: 600
token_max_ttl: 600
audience: vault
@@ -0,0 +1,10 @@
# Allow reading environment variables for encapi
---
rules:
- path: "kv/data/service/encapi/environment"
capabilities:
- read
auth:
k8s/au/syd1:
- encapi
@@ -0,0 +1,10 @@
# Allow reading environment vars for postgres/encapi
---
rules:
- path: "kv/data/service/encapi/postgres-password"
capabilities:
- read
auth:
k8s/au/syd1:
- encapi