-
-
Notifications
You must be signed in to change notification settings - Fork 70
Override DropRole method for Azure #62
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
Conversation
…rmat for postgres
arnarg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this also work? This has much less code duplication
func (azpg *azurepg) DropRole(role, newOwner, database string, logger logr.Logger) error {
azNewOwner := azpg.GetRoleForLogin(newOwner)
return azpg.pg.DropRole(role, azNewOwner, database, logger)
}
arnarg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I want to wait for @hitman99 to review this.
hitman99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Added host and database_name to Kubernetes secret * Fixed indentation * WIP: operator-sdk update from v0.14.0 to v0.17.1 (movetokube#55) * operator-sdk update from v0.14.0 to v0.15.2 * operator-sdk update from v0.15.2 to v0.16.0 * operator-sdk update from v0.16.0 to v0.17.1 * operator-sdk update from v0.14.0 to v0.17.1 (movetokube#55) * operator-sdk update from v0.14.0 to v0.15.2 * operator-sdk update from v0.15.2 to v0.16.0 * operator-sdk update from v0.16.0 to v0.17.1 * Override DropRole method for Azure (movetokube#62) * Override DropRole method for Azure, the newOwner can be an invalid format for postgres * Refactor * Create FUNDING.yml * update readme with contribution notes (movetokube#64) Co-authored-by: Tomas Adomavicius <tomas.adomavicius@devbridge.com> * change base image to ubi8 (movetokube#59) update container base image to ubi8 * use ubuntu-latest instead of ubuntu-16 (movetokube#68) * add JDBC compliant URI to kubernetes secret (movetokube#69) * Add generated secret details to README.md * Add optional annotations (movetokube#66) Co-authored-by: lemstra.b <lemstra.b@tkppensioen.nl> Co-authored-by: Tomas <admin@hitman.lt> Co-authored-by: Tomas <tomas@adomavicius.com> Co-authored-by: Pieter C <pieter.callewaert@nipro-group.com> Co-authored-by: Tomas Adomavicius <tomas.adomavicius@devbridge.com> Co-authored-by: eapri <a@pouli.nl> Co-authored-by: Steve Boardwell <steve.boardwell@datameer.com>
Hi all, I'm back with an Azure fix, this time it's related with the
dropOnDeleteoption of aPostgresobject. (Didn't use it until this week)In Azure Database for PostgreSQL servers the username has the format
<user@servername>This username is also passed to the DropRole as the
newOwner, which is not a valid user for postgres.This is a copy of the DropRole base method, but the user for
newOwneris fixed with theGetRoleForLoginmethod.Setting this as draft until I have tested this more on our cluster.Tested and works now!