https://prefect.io logo
Title
g

Goh Rui Zhi

07/12/2021, 1:16 PM
Hello, I'm trying to set up prefect server via the helm chart and I need an external db. I 've changed the values in value.yaml to my postgres db instance and deployed it. The pods for apollo, ui and towel seems to be working well, but graphql and hasura has failed. From the logs, I see that my password authentication has failed for my postgres instance. I am fairly certain that the username, password and external hostnames are correct. Why is this happening? Apologies for not providing any screenshots, the database configurations is confidential. Also, I do not have the luxury of running
prefect server start --postgres-url postgres://<username>:<password>@hostname:<port>/<dbname>
or similar commands and can only make use of value.yaml to change the configurations. Any help will be appreciated 🙂 Edit: I also realised that the database_url stated in the logs does not have the password field, it is just username@hostname:port/dbname. Is this expected?
k

Kevin Kho

07/12/2021, 1:49 PM
Hey @Goh Rui Zhi, maybe you can try doing it like this where you add the
connection_url
of the external database to your
config.toml
file?
g

Goh Rui Zhi

07/12/2021, 2:03 PM
Hey @Kevin Kho thanks for the quick reply! However, I'm afraid I can't really do that either, since only the deployment agent has access to the environment. The only thing I could do is specify the configs in values.yaml. Would it be possible to show me an example of the values.yaml file that is configured for external db? I think that should help me get rid of any careless mistakes I might have made.
k

Kevin Kho

07/12/2021, 2:32 PM
I see. I haven’t seen it configured that way so I’d have to ask the team. Will get back to you on that.
g

Goh Rui Zhi

07/12/2021, 2:40 PM
Thank you so much! @Kevin Kho
n

nicholas

07/12/2021, 2:47 PM
@Goh Rui Zhi can you share your
values.yaml
with sensitive values redacted?
g

Goh Rui Zhi

07/12/2021, 3:03 PM
It is something like that. @nicholas
n

nicholas

07/12/2021, 3:21 PM
Can you try setting your password in a secret and referencing it here instead?
(using the
existingSecret
field)
g

Goh Rui Zhi

07/12/2021, 3:55 PM
@nicholas Sure! Just to be completely sure, the existingSecret field needs to be a path to my secrets file? And is it a .yaml file or a .toml file?
n

nicholas

07/12/2021, 4:14 PM
That would be a reference to a kubernetes-set secret, using something like
kubectl create secret
g

Goh Rui Zhi

07/13/2021, 2:00 AM
It works! Thank you both! Perhaps you should the postgresPassword field is not working?