Closed thamudi closed 2 weeks ago
Hello @thamudi
In order to bring some light about the "DATASOURCES_DEFAULT_HOST can't be empty when mariadbDependencyEnabled and postgresqlDependencyEnabled are disabled" error message, I am going to try to explaing what moved us to introduce it.
This helm chart can install two different databases engines (mariadb and postgresql) both of them using bitnami charts, and also connect passbolt already created databases. We put a lot of effort on creating a "batteries included" chart so people can test passbolt (with mysql or postgresql) without configuring many things. This means that we "calculate" automatically some configurations at render time, and the host is the one that needs more logic because of the different possible scenarios (eg. default mariadb, default postgresql, mysql with replicas, external database, and so and forth...). So, Did you install it with postgresql subchart? It will work seemlessly. Did you install it with the mariadb subchart using the replication feature? Same. Did you pass the host using the passboltEnv.plain.DATASOURCES_DEFAULT_HOST to use an external database? It is also ok. But, to do so, we need to be sure that we have one out of those 3 configurations. Either we need directly the host, or we need to know which subchart you are using. And, to ensure this, we created the error message.
Long story short, this issue can be solved in two different ways:
We would like to hear your insights on this particular feature.
Thanks for the detailed explanation.
I am thinking that keeping the error message and adding a flag to disable the check for those who have more advanced configuration would be a more suitable approach in this scenario.
EDIT:
@Tecnobutrul
I would like to clarify that I did add the DATASOURCES_DEFAULT_HOST
in the chart and I am connecting to it using TLS ,however, the only way to make the chart work is by also providing the remaining config in the plain and secrets in the secrets sections of the chart. Providing them from via a config map and a secrets then passing mapping them under extraEnvFrom
doesnt seem to work. Note, when executing a shell into the pod and using printenv
seems to show the values correctly passed using the extraEnvFrom
method but are not reflected on PHP configuration level.
I have an issue with setting up the chart with the config-maps and secrets separated from the charts values.
To explain, my configuration that are in the configmaps and secrets gets passed to the container and executing a shell into the pod shows the values using
printenv
command. However, it is not establishing a DB connection with my RDS and after checking the logs in my DB server it shows that wrong credentials where used.This issue doesn't happen and the chart works when I use the same configuration directly under
passboltEnv.plain
andpassboltEnv.secret
in the chart.Here's my chart and its configurations.
Not working configmap.yaml
secrets.yaml
NOTE: you will notice at the passboltenv section I used the same values I have in the configmap. Reason is that when I try to install it, it tells me that these values are missing and I need to add them even though I have the applied in the configmaps and secrets files.
values.yaml
So, like I mentioned above in order to make the chart work I just need to move the values from the config maps and secrets and have them directly in the chart.
Any insight on how to fix this? Am I missing something?