feat(deploy): chart Vault CRDs gated by vault.enabled (default false)

Adds VaultAuth + VaultStaticSecret + VaultDynamicSecret templates gated behind .Values.vault.enabled (default false). Default helm install keeps working in degraded mode. Chart becomes Vault-ready without activating Vault dependencies. iac/ terraform + Vault workflow follow as PR-IAC1 (requires user manual prereqs in Vault).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-05-06 07:13:37 +02:00
parent a26cc96239
commit 8b1485e143
4 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{{- if .Values.vault.enabled }}
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultAuth
metadata:
name: auth
namespace: {{ .Release.Namespace }}
spec:
method: kubernetes
mount: kubernetes
kubernetes:
role: {{ .Values.vault.role }}
serviceAccount: {{ include "dance-lessons-coach.serviceAccountName" . }}
audiences:
- vault
{{- end }}

View File

@@ -0,0 +1,17 @@
{{- if .Values.vault.enabled }}
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultDynamicSecret
metadata:
name: vso-db
namespace: {{ .Release.Namespace }}
spec:
mount: postgres
path: {{ .Values.vault.postgresPath }}
destination:
create: true
name: vso-db-credentials
rolloutRestartTargets:
- kind: Deployment
name: {{ include "dance-lessons-coach.fullname" . }}
vaultAuthRef: auth
{{- end }}

View File

@@ -0,0 +1,16 @@
{{- if .Values.vault.enabled }}
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultStaticSecret
metadata:
name: vault-kv-app
namespace: {{ .Release.Namespace }}
spec:
type: kv-v2
mount: kvv2
path: {{ .Values.vault.kvv2Path }}
destination:
name: secretkv
create: true
refreshAfter: 30s
vaultAuthRef: auth
{{- end }}