Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
[x] I have searched budibase discussions and github issues to check if my issue already exists
Hosting
Self
Method: k8s(helm)
Budibase Version: 2.33.2
Chart Version: 3.0.216
Describe the bug
When the helm chart is upgraded or synced and there is an existing secret that has an empty string for one or more of the keys, the keys with the empty strings are removed from that secret
but since the empty string is a valid base64 encoded value for the empty string this will cause budibase to crash since the environment variable is now missing
To Reproduce
Steps to reproduce the behavior:
create a secret with one of the data keys as the empty string "" e.g apiEncryptionKey
upgrade the chart to a newer version or sync the state from the chart back to the cluster
wait
the budibase app will crash because of a missing env variable like apiEncryptionKey
Expected behavior
keys will not be removed from the existing secret
Additional context
this happens because inside the charts/budibase/templates/secrets.yaml the secret is read and reapplied from a lookup variable and not quoted before readding
Checklist
Hosting
Describe the bug When the helm chart is upgraded or synced and there is an existing secret that has an empty string for one or more of the keys, the keys with the empty strings are removed from that secret
but since the empty string is a valid base64 encoded value for the empty string this will cause budibase to crash since the environment variable is now missing
To Reproduce Steps to reproduce the behavior:
apiEncryptionKey
apiEncryptionKey
Expected behavior keys will not be removed from the existing secret
Additional context this happens because inside the
charts/budibase/templates/secrets.yaml
the secret is read and reapplied from a lookup variable and not quoted before readding