Add three layers for setting environment variables:
- env: plain key-value map for any vaultwarden env var
- secretEnv: shorthand for secretKeyRef without verbose YAML
- extraEnv: raw Kubernetes env spec for complex cases (fieldRef, etc.)
This lets users set any vaultwarden env var without requiring chart
changes, while the structured values (vaultwarden.smtp.*, database.*, etc.)
remain available for validation and existingSecret integration.
Add a production-ready Helm chart under helm/vaultwarden/ with:
- SQLite default, PostgreSQL/MySQL selectable
- Database URL from secret or composed from parts (Zalano/CNPG operator support)
- All sensitive values via secretKeyRef with existingSecret support
- Hardened security: non-root (UID 1000), readOnlyRootFilesystem, drop ALL
capabilities, seccomp RuntimeDefault, automountServiceAccountToken disabled
- Ingress with ingressClassName, annotations, labels, TLS
- PVC with helm.sh/resource-policy: keep, storageClassName 3-way handling
- Service annotations/labels, NodePort, LoadBalancer support
- Admin panel, SMTP, SSO/OIDC, push notifications, Yubico OTP
- Template validation (fail on misconfiguration)
- extraEnv, extraVolumes, extraVolumeMounts, initContainers
- Comprehensive README with configuration reference
Tested with helm lint --strict, helm template (6 scenarios),
and deployed on a real k8s cluster (probes pass, logs clean).