You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(helm): add optional PostgreSQL backing store with Secret-based credentials
- Add postgres.enabled and postgres.deploy values to control database
backend (SQLite vs PostgreSQL) and subchart deployment independently.
- Introduce db-secret.yaml template for Opaque Secret with assembled
postgresql:// connection string injected via OPENSHELL_DB_URL env var.
- Add Bitnami PostgreSQL as optional subchart dependency keyed on
postgres.deploy to prevent subchart deployment in external mode.
- Externalize JWT signing key file mode via sandboxJwt.secretDefaultMode
with 0400 default matching upstream.
- Add validation guard for postgres.deploy=true without postgres.enabled.
- Add helm unit tests covering internal, external, URL-override, special
character encoding, and misconfiguration error paths.
- Update README with Kubernetes and OpenShift install examples for
bundled and external PostgreSQL configurations.
- Add helm dependency build to lint and unittest tasks.
- postgres.enabled=false: use .Values.server.dbUrl (default sqlite)
108
+
- postgres.enabled=true + deploy=true: derive URL from bundled postgres subchart
109
+
- postgres.enabled=true + deploy=false: use external.url or compose external fields
110
+
*/}}
111
+
{{- define"openshell.dbUrl" -}}
112
+
{{- if.Values.postgres.enabled -}}
113
+
{{- ifnot.Values.postgres.deploy -}}
114
+
{{- if.Values.postgres.external.url -}}
115
+
{{- .Values.postgres.external.url -}}
116
+
{{- else -}}
117
+
{{- $host:= required "postgres.external.host is required when postgres.deploy=false and no postgres.external.url is provided".Values.postgres.external.host -}}
118
+
{{- $pw:= required "postgres.external.password is required when postgres.deploy=false and no postgres.external.url is provided".Values.postgres.external.password -}}
0 commit comments