utkuozdemir / helm-charts

Helm Chart Repository
MIT License
41 stars 14 forks source link

Unable to overwrite database.db file with updated password #5

Closed shashank-raut closed 3 years ago

shashank-raut commented 3 years ago

If I deploy filebrowser using helm and set a password using config override and then re-deploy with a new password by using the configmap override, the password does not get updated in the database.db file stored in Azurefile. (I am aware about using the UI and CLI to change password, but was looking for some automated way)

utkuozdemir commented 3 years ago

It seems this is the default behavior of filebrowser. Adding logic to the chart to modify the DB contents doesn't feel right - it shouldn't be the chart's responsibility.

One thing that I can do it to add support for arbitrary initContainers to the deployment. Using an init container, you can run shell commands to execute CLI commands to implement the logic you require.

Would this work for you?

shashank-raut commented 3 years ago

This is exactly the workaround that I added to resolve this. Probably we have to wait till filebrowser adds environment variable support for username and password which would make it easier as initContainer delays the filebrowser cantainer deployment. Thank you for your response.

utkuozdemir commented 3 years ago

@shashank-raut no problem, I added support for initContainers to the chart anyway, in case it helps: https://github.com/utkuozdemir/helm-charts/commit/837c6eb415f87fe57f462b3e5df4bf67f73ca519