Skip to content

Added host and database_name to Kubernetes secret #51

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

Merged
merged 2 commits into from
Jul 9, 2020

Conversation

bartlemstra
Copy link

I need the host and database_name separately in my application, so I added them to the secret.

@arnarg
Copy link

arnarg commented Jul 8, 2020

Are you unable to use the POSTGRES_URL in the form of postgresql://<user>:<pass>@<host>/<database>?

@bartlemstra
Copy link
Author

That doesn't seem to work: Caused by: java.lang.RuntimeException: Driver org.postgresql.Driver claims to not accept jdbcUrl, postgresql://***

@arnarg
Copy link

arnarg commented Jul 8, 2020

Can you prepend jdbc: in front of it? So it's jdbc:postgresql://<user>:<pass>@<host>/<database>.

https://jdbc.postgresql.org/documentation/80/connect.html

@bartlemstra
Copy link
Author

Thanks for the suggestion, but that doesn't help:
Caused by: java.lang.RuntimeException: Driver org.postgresql.Driver claims to not accept jdbcUrl, jdbc:postgresql://***

Copy link

@arnarg arnarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really have a problem with this approach then.

@hitman99 What do you think?

"PASSWORD": []byte(password),
"LOGIN": []byte(login),
"POSTGRES_URL": []byte(pgUserUrl),
"HOST": []byte(r.pgHost),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation

@arnarg arnarg requested a review from hitman99 July 8, 2020 14:42
hitman99
hitman99 approved these changes Jul 8, 2020
Copy link
Member

@hitman99 hitman99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs proper indentations as @arnarg said

@bartlemstra bartlemstra requested review from hitman99 and arnarg July 9, 2020 09:23
@hitman99 hitman99 merged commit 10209e1 into movetokube:master Jul 9, 2020
@hitman99
Copy link
Member

hitman99 commented Jul 9, 2020

postgres-operator 0.4.3 was released with these changes: https://github.com/movetokube/postgres-operator/releases/tag/0.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants