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

feature: add volume cleanup behaviour and optimize setup defaults procedure #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ptyin
Copy link
Member

@ptyin ptyin commented Feb 29, 2024

Fixes #16

What this PR does?

This PR aims to provide users choices for retain or delete volumes after deleting CRs. Users can use following configurations to control this behaviour.

# ...
spec:
  # ...
  persistence:
    volumeReclaimPolicy: Delete  # Or "Retain"

How so?

Basically, I added finalizers to CR for controllers to implement asynchronous pre-delete hooks. In this pre-delete hook, I cleanup all binded PVCs and orphaned PVCs as well.

See https://book.kubebuilder.io/reference/using-finalizers to learn the context.

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.

Allows control of volumn reclaim behaviour for SeataServer
1 participant