PVC safeguards for KRaft controllers #109
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The PVC reconciler is working as expected for KRaft controllers. I've tested the following scenarios:
For the "add additional disk" scenario, this would only make since for controllers if we were to replace the disk due to changing the storage class or decreasing the disk size.
To change storage class:
Reduce disk size:
There is a Kafka doc on how to replace a disk: https://kafka.apache.org/documentation/#replace_disk. Through my testing, this did not work well with KOperator since it will try to add a second disk first which will get it into an unrecoverable state.
To ensure that we don't get the cluster into an unrecoverable state for KRaft controllers, we can add safeguards to prevent adding new disk or removing disk if it would cause an unrecoverable state for controllers.
Type of Change
Checklist