-
Notifications
You must be signed in to change notification settings - Fork 66
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
Allow PVC expansion #670
Allow PVC expansion #670
Conversation
TODO Add new experimental opt-in for this feature (so no one accidentially messes up their cluster). Was thinking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've read to the changes and did not find anything wrong. But I must admit I wasn't able to actually evaluate all of it as it's a bit too much for me.
There are 3 tests failing that I re-triggered.
Those two tests are expected to fail at this point. |
7b066ba
to
56fca3e
Compare
verifyDatacenterDeleted(ctx, dcName).Should(Succeed()) | ||
}) | ||
}) | ||
// This isn't functional with envtest at the moment, fails with (only in envtest): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: remove the commented code
pkg/reconciliation/handler.go
Outdated
@@ -121,6 +121,8 @@ func (rc *ReconciliationContext) IsValid(dc *api.CassandraDatacenter) error { | |||
return errs[0] | |||
} | |||
|
|||
// TODO Verify if we can expand the PVC or should we reject changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: we're not doing it in this PR? Any potential problem if we don't do the checks like the cluster breaking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do check, this is just another place where I was planning to do the same check previously. I'll remove this comment.
… ability to verify if StorageClass supports resizing Add resize functionality, new DatacenterCondition to indicate Resizing is happening Patch the PVC and reconcile in 10 seconds Fix existing tests Add validation test Implement unit tests and fix the implementation of expansion Let VoluemResize actually just continue instead of waiting for the PVC resize, we will do a requeue and check there before recreating the StatefulSet Add RBAC role for StorageClasses Fix lint issues, update versions of tools Add e2e test for the PVC expansion using TopoLVM Disable StorageConfig webhook validation failure Improve failure logs with dump of pvc and pv also Move datacenterCondition reset for ResizingVolumes Log also StatefulSets, add annotation to allow StorageConfig changes Add validation if PVC expansion is allowed, modify the behavior to keep the existing PersistentVolumeClaims in the StS, but modifying the sizes only Update controller-runtime to 0.17.4 and update some logging Update docker/build-push-action from v4 to v6 Add CHANGELOG, return all the other e2e tests, update Cassandra/DSE versions Modify the annotation check to happen in the CheckVolumeClaimSizes() instead of CheckRackPodTemplate() to ensure rest of the validations would still always happen. Also, modify the envtests to use more re-usable AsyncAssertions. Add new events to indicate when Datacenter was set to Valid: False
What this PR does:
Support modifying the CassandraDataVolumeClaimSpec sizes if the underlying StorageClass supports it and an annotation
cassandra.datastax.com/allow-storage-changes: true
is placed on the CassandraDatacenter. The operator will automatically increase the size of the PVC and wait for the expansion to finish.Which issue(s) this PR fixes:
Fixes #263
Fixes #668
Checklist