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

Enable slot and publication deletion when stream application is removed #2684

Merged
merged 27 commits into from
Jul 25, 2024

Conversation

idanovinda
Copy link
Member

@idanovinda idanovinda commented Jul 2, 2024

Follow up on #2563

The current behaviour of our operator for the stream section allows us to create FES resources. During the creation, the postgres-operator will create FES resources, publications, and replication slots. However, during deletion (when user drop the stream section from the manifest), operator only removes the FES resources, while publications and replications are not deleted. This results in need for manual deletion by someone who has administrator roles.

Changes:

  • refactor syncPublication() to allow sync publication (CRUD) per database
  • delete replication slot based on the publication it is deleted
  • update createOrUpdateStream() to allow resource deletion when removed from manifest
  • add minimal FES CRD to enable FES resources creation for E2E test
  • adding E2E test - create and delete FES resources

pkg/cluster/streams.go Outdated Show resolved Hide resolved
@idanovinda idanovinda marked this pull request as ready for review July 8, 2024 16:09
idanovinda and others added 5 commits July 11, 2024 14:56
* refactor syncStreams() by making few variables as a struct
* filtering publication to just get the ones created by postgres user
Co-authored-by: Ida Novindasari idanovinda@gmail.com
e2e/tests/test_e2e.py Outdated Show resolved Hide resolved
e2e/tests/test_e2e.py Outdated Show resolved Hide resolved
e2e/tests/test_e2e.py Outdated Show resolved Hide resolved
idanovinda and others added 3 commits July 24, 2024 14:19
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
e2e/tests/test_e2e.py Outdated Show resolved Hide resolved
pkg/cluster/database.go Outdated Show resolved Hide resolved
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
@FxKu FxKu added this to the 1.13.0 milestone Jul 24, 2024
@FxKu
Copy link
Member

FxKu commented Jul 24, 2024

👍

1 similar comment
@idanovinda
Copy link
Member Author

👍

@idanovinda idanovinda merged commit 31f474a into master Jul 25, 2024
12 checks passed
@idanovinda idanovinda deleted the enable-slot-deletion branch July 25, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants