vault: use dedicated service account for k8s auth

This commit is contained in:
Brad Stein 2025-12-25 03:43:17 -03:00
parent bb93f730d5
commit 77ecf3229e
4 changed files with 22 additions and 0 deletions

View File

@ -4,6 +4,8 @@ kind: Kustomization
namespace: vault
resources:
- namespace.yaml
- serviceaccount.yaml
- rbac.yaml
- configmap.yaml
- statefulset.yaml
- service.yaml

13
services/vault/rbac.yaml Normal file
View File

@ -0,0 +1,13 @@
# services/vault/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: vault-auth-delegator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: vault
namespace: vault

View File

@ -0,0 +1,6 @@
# services/vault/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: vault
namespace: vault

View File

@ -17,6 +17,7 @@ spec:
labels:
app: vault
spec:
serviceAccountName: vault
nodeSelector:
node-role.kubernetes.io/worker: "true"
kubernetes.io/arch: arm64