Skip to content
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

GCP wrapper #83

Merged
merged 3 commits into from
Apr 6, 2022
Merged

GCP wrapper #83

merged 3 commits into from
Apr 6, 2022

Conversation

aroundthecode
Copy link
Contributor

@aroundthecode aroundthecode commented Mar 31, 2022

Add a GCP wrapper to work on Google SQL instances

In reference to #82 and #63 I tried to provide an initial GCP implementation.

To have operator work with GCP you have

  1. use postgres connection in secret
  2. manually create a Master role e.g. "devops-operators" (must NOT be the same as the connection secret)
  3. use such role in database CR e.g. spec.masterRole: devops-operator

DropRole method will check for db owner and will skip master role dropping.

I'm not a GO developer so I tried to keep all modification in gcp.go, please modify at will to make it compliant with other code style

Working with both Database and Role CR, both in creation and deletion.
@hitman99

Add a GCP wrapper to work on Google SQL instances
@hitman99
Copy link
Member

hitman99 commented Apr 1, 2022

Thank you for your contribution, I will get this reviewed today

pkg/postgres/gcp.go Outdated Show resolved Hide resolved
pkg/postgres/gcp.go Show resolved Hide resolved
pkg/postgres/gcp.go Outdated Show resolved Hide resolved
pkg/postgres/gcp.go Outdated Show resolved Hide resolved
pkg/postgres/gcp.go Show resolved Hide resolved
mod doc to readme and query to const
@aroundthecode
Copy link
Contributor Author

Updated as requested

@aroundthecode aroundthecode requested a review from hitman99 April 1, 2022 15:28
@aroundthecode
Copy link
Contributor Author

@hitman99 any chance you can review this shortly and generate a new version?
I'm using a patched operator version, but I'd prefer to stay on the mainstream :)

@hitman99
Copy link
Member

hitman99 commented Apr 6, 2022

@aroundthecode PR approved and merged. Thanks for using my operator :)

@hitman99 hitman99 merged commit 2297402 into movetokube:master Apr 6, 2022
@aroundthecode aroundthecode deleted the feat/gcp branch April 6, 2022 09:24
@aroundthecode aroundthecode mentioned this pull request Apr 8, 2022
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.

2 participants