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

Remove all secrets on delete incl. pooler #1091

Merged
merged 5 commits into from
Aug 10, 2020
Merged

Remove all secrets on delete incl. pooler #1091

merged 5 commits into from
Aug 10, 2020

Conversation

FxKu
Copy link
Member

@FxKu FxKu commented Aug 10, 2020

This PR sets secrets on SYNC, so that they can be deleted.

On connection pooler deletion the corresponding secret is now removed via API call. Because of the way roles and secrets are synced with the needCoonectionPooler condition, the pooler user and secret are no longer set after deletion. But resources would still be there. For the database user it's fine - operator does not delete those in general - but the secret should go.

@FxKu FxKu changed the title Delete pooler secret Remove all secrets on delete incl. pooler Aug 10, 2020
} else {
uid := secret.UID
if err = c.deleteSecret(uid, *secret); err != nil {
return fmt.Errorf("could not delete pooler secret: %v", err)
Copy link
Member

Choose a reason for hiding this comment

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

does this prevent deletion of e.g deployment? disable pooler should cleanup as good as it gets.

Copy link
Member Author

Choose a reason for hiding this comment

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

nope. 1. Deployment, 2. Service, 3. Secret

It's true, however, that if 1. or 2. return an error the rest is not deleted.

@Jan-M
Copy link
Member

Jan-M commented Aug 10, 2020

👍

@Jan-M
Copy link
Member

Jan-M commented Aug 10, 2020

👍

1 similar comment
@FxKu
Copy link
Member Author

FxKu commented Aug 10, 2020

👍

@FxKu FxKu merged commit 0508266 into master Aug 10, 2020
@FxKu FxKu added this to the 1.6 milestone Aug 10, 2020
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