-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DATASOURCES_DEFAULT_HOST can't be empty when mariadbDependencyEnabled and postgresqlDependencyEnabled are disabled #84
Comments
Hey @vaaleyard, Yes this is intentional as we considered that for the database hostname it would be enough to store it as a configmap. |
And is it possible to pass the other |
I think you would have problems with this function https://github.com/passbolt/charts-passbolt/blob/main/templates/_helpers.tpl#L67 that doesn't consider that the host could be stored in a secret. |
+1 to using existing database and load necessary envs from secret |
The only "important" vars I could set this way was these ones:
At least these ones works. |
Hello. Thank you for your contribution. We are working on a fix for this issue and it will be included in the next release, which will be available in a few days. |
Hey, At least I am getting:
Isnt this issue solved yet? Thanks and have a nice one |
This is not solved. You have to pass the variable in the values directly, but I leave the variable empty in the git repository. |
As a workaround: If your db hostname id is not static you could retrieve it by any means and deploy it using a |
Tried it this way as well:
without luck ;-). Used a similar workaround for another helm deployment. Unfortunately, Easiest way for my understanding would be, if the helm-chart respects if DATASOURCES_DEFAULT_HOST and PORT are defined via extraEnv:, it dont needs to be defined via plain:. |
Ok, more than that. I tried to set the variables hard coded for testing and maybe find a better solution afterwards.
You see, host, port, database seems to be changed in that DEFAULT_URL, but USERNAME and PASSWORD are not respected from variables. edit: this seems to happen during first user creation command inside php |
Hello! One of the main concerns that we had when we created this helm charts was it had to be batteries included solution. So you can install and test passbolt on a kubernetes cluster in one shot, without any configuration. To do so the charts calculates some of the needed configurations (database service url, for instance) if it is possible from other values. That's why we introduced the error message that you are facing to help users to understand what is missing when they introduced an incompatible configuration. For this particular issue, we need to know the database host at render time in order to create the DATASOURCES_DEFAULT_URL environment variable for postgresql. If that value is already set on a secret in the k8s cluster, it is imposible to calculate the url so it returns an error and stop the installation. Our proposal solution is, we keep checking for incompatible configurations as long the user doesn't set any .Values.passboltEnv.extraEnvFrom. In the case that the user added an entry on .Values.passboltEnv.extraEnvFrom we are going to print a warning if we don't find some of the needed values but we let the process run. Proposal solutionCreate a secret with the environment values: apiVersion: v1
kind: Secret
metadata:
name: test-secret
data:
DATASOURCES_DEFAULT_URL: CHANGEME
DATASOURCES_DEFAULT_DATABASE: CHANGEME
DATASOURCES_DEFAULT_PASSWORD: CHANGEME
DATASOURCES_DEFAULT_HOST: CHANGEME Add the following configuration on your passboltEnv:
extraEnvFrom:
- secretRef:
name: test-secret Then, after the helm install/upgrade you will see a warning (we could add a flag to silent this message if needed):
We would love to hear your feedback on this proposal, and feel free to share a different one in case this one doesn't fit your needs. |
I'm trying to use an external database as the passbolt db, and I want to pass its variables to fetch from a secret I have in the my kubernetes cluster.
I have a secret in kubernetes with four variables, which has the connection settings for the database:
My values file is something like this:
Troubleshooting the error message:
and going to _helpers.tpl#L67 it looks like I have to obligatory pass the HOST variable as plain... Wouldn't it be better to also allow it to pass as a secret variable? Because it doesn't make sense to also leave this var in plain text.
The text was updated successfully, but these errors were encountered: