Feat: added a field for replication grants for roles#313
Open
Simon-Lind-glitch wants to merge 1 commit intomovetokube:masterfrom
Open
Feat: added a field for replication grants for roles#313Simon-Lind-glitch wants to merge 1 commit intomovetokube:masterfrom
Simon-Lind-glitch wants to merge 1 commit intomovetokube:masterfrom
Conversation
Author
|
Maybe it should be called withReplication to more clearly reference the default way of assigning it to a role |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add replication flag to PostgresUser
Adds a replication: true flag to the PostgresUser CRD. The use case is tools like Debezium that need a user with the replication attribute to manage logical slots and stream data using logical slots for CDC.
The implementation is cloud-provider aware. On standard Postgres, GCP and Azure it uses ALTER ROLE x WITH REPLICATION. On AWS RDS it grants rds_replication instead since RDS doesn't support ALTER ROLE for this attribute. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication.html
Example usage:
apiVersion: db.movetokube.com/v1alpha1
kind: PostgresUser
metadata:
name: debezium
spec:
role: debezium
database: my-db
secretName: debezium-secret
privileges: READ
replication: true