Skip to content

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 force-pushed the delete-pooler-secret branch from 9c6c823 to 521c27f Compare August 10, 2020 07:06
@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