-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Bug Description
Chart version 2.238.0 does not properly process PostgreSQL database configuration from Helm values, resulting in the deployed ConfigMap defaulting to SQLite configuration instead of PostgreSQL.
Chart Versions Affected
- ✅ 2.206.0: Works correctly with PostgreSQL configuration
- ❌ 2.238.0: Ignores PostgreSQL values, defaults to SQLite
Steps to Reproduce
- Deploy chart version 2.238.0 with PostgreSQL configuration:
database:
driver: postgres
host: postgresql-rw.database.svc.cluster.local
port: 5432
user: casdoor
databaseName: casdoor
password: test_password
sslMode: disable- Check the generated ConfigMap:
kubectl get configmap casdoor-config -n <namespace> -o yamlExpected Behavior
The app.conf in the ConfigMap should contain:
driverName = postgres
dataSourceName = "user=casdoor password=test_password host=postgresql-rw.database.svc.cluster.local port=5432 dbname=casdoor sslmode=disable"Actual Behavior (2.238.0)
The app.conf contains SQLite configuration instead:
driverName = sqlite
dataSourceName = file:casdoor.db?cache=sharedVerification
I verified the chart templates using helm template:
Chart 2.206.0 (Working):
helm template test oci://registry-1.docker.io/casbin/casdoor-helm-charts \
--version 2.206.0 \
--set database.driver=postgres \
--set database.host=postgresql-rw.database.svc.cluster.local \
--set database.port=5432 \
--set database.user=casdoor \
--set database.databaseName=casdoor \
--set database.password=test123 \
--set database.sslMode=disable \
| grep -A 5 "driverName"Output:
driverName = postgres
dataSourceName = "user=casdoor password=test123 host=postgresql-rw.database.svc.cluster.local port=5432 dbname=casdoor sslmode=disable"Chart 2.238.0 (Broken):
Same command with --version 2.238.0 produces:
driverName = sqlite
dataSourceName = file:casdoor.db?cache=sharedImpact
- Pods crash with "unable to open database file: out of memory (14)" when trying to use SQLite
- PostgreSQL configuration is completely ignored
- Deployment fails in production environments requiring PostgreSQL
- Forces users to stay on older chart versions
Environment
- Kubernetes: v1.28+
- Helm: 3.x
- ArgoCD: 2.x (also tested with direct Helm deployment)
Workaround
Downgrade to chart version 2.206.0:
spec:
source:
chart: casdoor-helm-charts
repoURL: oci://registry-1.docker.io/casbin/casdoor-helm-charts
targetRevision: 2.206.0Additional Context
The helper template casdoor.dataSourceName in _helpers.tpl appears correctly structured to handle PostgreSQL configuration, but something in the rendering process between 2.206.0 and 2.238.0 causes it to default to SQLite regardless of the values provided.
This appears to be a regression introduced between these two versions.