-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add ability to retain and re-use pod PVCs instead of always recreating them #325
Add ability to retain and re-use pod PVCs instead of always recreating them #325
Conversation
This implementation isn't quite complete. All of the objects created under To prevent this, we have to release ownership of the Will push changes to address this. |
I've verified these changes by running the following tests:
All test cases were successful. |
What's in this PR?
Adds a new optional field called
ReclaimPolicy
to nifikop's volumeStorageConfig
. This instructs nifikop whether or not toDelete
orRetain
PVCs onNifiCluster
deletion.There's a caveat here where nifikop will only re-attach the PVC to the node it was previously attached to. It will not re-attach the PVC to a random node in the case that a
NifiCluster
is created and then deleted with PVCs configured withRetain
reclaim policies. If a PVC is created for node 2, for example, it will only ever belong to node 2.Example NifiCluster
NodeConfig
:Why?
To prevent data loss when a
NifiCluster
is accidentally deleted. I think we ought to recommend that the reclaim policies be left as the defaultDelete
policy to avoid the potential for leaving PVCs around indefinitely. If a PVC is configured asRetain
, nifikop will never delete it. it must be deleted manually or reconfigured asDelete
and then delete theNifiCluster
.Checklist