https://prefect.io logo
Title
s

Scarlett King

07/15/2021, 3:34 PM
Hi, we’re configuring persistent volume for the postgres database but having issues connecting to it. What do we need to set in the helm chart?
We’re using Azure and have set everything according to the values.yaml file
k

Kevin Kho

07/15/2021, 4:09 PM
Will ask the team about this.
s

Scarlett King

07/15/2021, 4:47 PM
The helm chart failed with the message ‘timed out waiting for condition’ and the container in AKS says ‘Error: secret “prefect-server-postgresql” not found’
m

Mariia Kerimova

07/15/2021, 5:08 PM
Hello Scarlett! Can you confirm that there are no secrets in the namespace with prefect server (
kubectl get secret
)? And did you set
existingSecret
in the helm chart?
s

Scarlett King

07/16/2021, 8:25 AM
Hi, we don’t have secret set up yet. We’re using the postgresqlPassword to test in the mean time
@Mariia Kerimova Does the secret only work if set in Kubernetes? We tried to set the secret in Azure KeyVault, retrieved it with docker and pass it to helm but it doesn’t recognise the values
m

Mariia Kerimova

07/16/2021, 2:38 PM
I have tested option with setting only postgresqlPassword, it works as intended, so I guess the issue might be with retrieving the value from KeyVault or passing it to the helm chart. I would recommend to create a kubernetes secret with key
postgresql-password
and value from your KeyVault, and set existingSecret to the name of the Kubernetes secret you've created, then it should work.
s

Scarlett King

07/20/2021, 9:11 AM
Hi @Mariia Kerimova, we’re still getting error. Is it possible that I send over an email on what we have tried and the errors we’re getting?
m

Mariia Kerimova

07/20/2021, 2:15 PM
Sure
d

Dali

07/21/2021, 8:27 PM
A colleague and I went through a similar process today. Hints in this thread helped us get over to finally having a running server. Of course we would likely still be scratching our heads if it wasn't for the helm charts and the

excellent youtube video

. It's a bit of a shame that Laura didn't actually run the upgrade for using external postgres instance, it may have clarified some things. Steps we stumbled on (we're kubernetes/helm newbies): • Like @Scarlett King, we observed that we couldn't get things running by using
postgresql.postgresqlPassword
with
postgresql.existingSecret
set to
null
. Did anyone get this running? • When using
postgresql.existingSecret
we misread the comment and thought that the secret should be called
postgresql-password
, rather than the key. We should have paid more attention. • It looked like the setup expects a database called
prefect
to exist in postgresql instance. Once we created it manually things progressed further. The init container seems to assume it exists and starts with upgrade. • Last piece of the puzzle was that our postgresql instance was at quite an old version (9.6) and didn't support all the syntax in migration scripts - once we upgraded postgresql to 11 (Spinal Tap reference coincidental) we were finally able to get the whole thing running. Hope this helps, either to folks going down the same route or you Prefect folks with updating docs/scripts. And finally big shout out to @Laura Lorenz ❤️ for the youtube presentation - it made things look a lot less scary and @Zanie ❤️ for getting the helm chart together - without it we may not even embark on this journey or may have abandoned it at some point.
❤️ 3
m

Mariia Kerimova

07/21/2021, 11:19 PM
Hello Dali! Thank you very much for your feedback! I'll open a PR to update the Readme of the helm chart about Postgresql version. 🙏
z

Zanie

07/22/2021, 12:12 AM
Glad you got this working! Mariia has opened a PR to the helm chart docs but feel free to PR any other documentation/faqs that you think may be helpful.