-
Notifications
You must be signed in to change notification settings - Fork 6
MLE-28304 Volume Resizing Implementation #162
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
Merged
Merged
Changes from 19 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
8b97e35
update specs
3fbddd2
update function spec
9fd9cec
update functional spec
61a376f
update spec
bbba505
update spec
c01fedd
1. add volume resize API/status schema, regenerate CRDs/deepcopy, and…
c154351
add resize RBAC prerequisites (PVC status, PV, events)
9892d97
feat: PR2.1 resize validation fencing and spec alignment
23a9b16
implement PVC resize engine with strategy-based patching, checkpoint …
9342e09
feat: StatefulSet sync and pod restart orchestration
062be65
feat: verification phase, completion semantics, and deferred handoff …
37a909d
Fix resize sync immutability path and namespace-scope StorageClass ac…
fefe138
bug fix for RBAC
95b0097
test(controller): add envtest coverage for volume resize request vali…
246d585
update spec location
230ffdf
improvement based on copilot review
681351b
MLE-28304 : add-test-suites for Volume Resizing (#164)
rwinieski 2cbd1b4
update contents in charts
c9e8568
feat(volume-resize): align pause semantics and harden retry/restart b…
1dac62e
Potential fix for pull request finding
pengzhouml f1208a5
Potential fix for pull request finding
pengzhouml 8ccb467
Potential fix for pull request finding
pengzhouml a8cb1ca
Potential fix for pull request finding
pengzhouml fdcf6bb
Use nondeterministic resize retry jitter
Copilot 2d586f4
Potential fix for pull request finding
pengzhouml b072ff9
Potential fix for pull request finding
pengzhouml 9a6dd20
Revert persistence.enabled to false in quick-start.yaml
Copilot 29d1100
Fix test summary tracker to correctly handle skipped tests
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| package v1 | ||
|
|
||
| import ( | ||
| "testing" | ||
| "time" | ||
|
|
||
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
| ) | ||
|
|
||
| func TestMarklogicGroupDeepCopyVolumeResizeStatus(t *testing.T) { | ||
| now := metav1.NewTime(time.Now()) | ||
|
|
||
| group := &MarklogicGroup{ | ||
| Spec: MarklogicGroupSpec{ | ||
| Persistence: &Persistence{ | ||
| Enabled: true, | ||
| Size: "20Gi", | ||
| ResizeStrategy: VolumeResizeStrategySequential, | ||
| }, | ||
| }, | ||
| Status: MarklogicGroupStatus{ | ||
| VolumeResizeStatus: &VolumeResizeStatus{ | ||
| OperationID: "op-1", | ||
| ObservedGeneration: 7, | ||
| Phase: VolumeResizePhaseWaitingForPVCResize, | ||
| Reason: VolumeResizeReasonPVCNotBound, | ||
| CurrentSize: "20Gi", | ||
| TargetSize: "50Gi", | ||
| ResizeStrategy: VolumeResizeStrategySequential, | ||
| TotalPVCs: 2, | ||
| PVCsCheckpointed: 1, | ||
| PVCStatuses: []PVCResizeStatus{ | ||
| { | ||
| Name: "data-0", | ||
| PodName: "pod-0", | ||
| RequestedSize: "50Gi", | ||
| ObservedCapacity: "20Gi", | ||
| State: PVCResizeStateWaitingForCheckpoint, | ||
| CheckpointType: PVCResizeCheckpointTypeOfflinePending, | ||
| RestartRequired: true, | ||
| LastReason: "PVCNotBound", | ||
| LastMessage: "waiting for pvc to bind", | ||
| LastTransitionTime: &now, | ||
| }, | ||
| }, | ||
| FailedPVCs: []FailedPVCStatus{ | ||
| {Name: "data-1", Reason: "ResizeFailed", Message: "api rejected resize"}, | ||
| }, | ||
| Markers: []string{"pr4.sync.started"}, | ||
| Warnings: []string{"storage provider delay"}, | ||
| LastTransitionTime: &now, | ||
| }, | ||
| }, | ||
| } | ||
|
|
||
| copied := group.DeepCopy() | ||
| if copied == group { | ||
| t.Fatalf("expected DeepCopy to return a new instance") | ||
| } | ||
|
|
||
| if copied.Spec.Persistence == group.Spec.Persistence { | ||
| t.Fatalf("expected persistence to be deeply copied") | ||
| } | ||
|
|
||
| if copied.Status.VolumeResizeStatus == group.Status.VolumeResizeStatus { | ||
| t.Fatalf("expected volume resize status to be deeply copied") | ||
| } | ||
|
|
||
| if copied.Status.VolumeResizeStatus.LastTransitionTime == group.Status.VolumeResizeStatus.LastTransitionTime { | ||
| t.Fatalf("expected resize timestamps to be deeply copied") | ||
| } | ||
|
|
||
| group.Spec.Persistence.ResizeStrategy = VolumeResizeStrategyParallel | ||
| group.Status.VolumeResizeStatus.PVCStatuses[0].Name = "data-modified" | ||
| group.Status.VolumeResizeStatus.FailedPVCs[0].Reason = "updated" | ||
| group.Status.VolumeResizeStatus.Markers[0] = "updated marker" | ||
| group.Status.VolumeResizeStatus.Warnings[0] = "updated warning" | ||
|
|
||
| if copied.Spec.Persistence.ResizeStrategy != VolumeResizeStrategySequential { | ||
| t.Fatalf("unexpected copied resize strategy: %s", copied.Spec.Persistence.ResizeStrategy) | ||
| } | ||
|
|
||
| if copied.Status.VolumeResizeStatus.PVCStatuses[0].Name != "data-0" { | ||
| t.Fatalf("unexpected copied pvc status name: %s", copied.Status.VolumeResizeStatus.PVCStatuses[0].Name) | ||
| } | ||
|
|
||
| if copied.Status.VolumeResizeStatus.FailedPVCs[0].Reason != "ResizeFailed" { | ||
| t.Fatalf("unexpected copied failed pvc reason: %s", copied.Status.VolumeResizeStatus.FailedPVCs[0].Reason) | ||
| } | ||
|
|
||
| if copied.Status.VolumeResizeStatus.Markers[0] != "pr4.sync.started" { | ||
| t.Fatalf("unexpected copied marker: %s", copied.Status.VolumeResizeStatus.Markers[0]) | ||
| } | ||
|
|
||
| if copied.Status.VolumeResizeStatus.Warnings[0] != "storage provider delay" { | ||
| t.Fatalf("unexpected copied warning: %s", copied.Status.VolumeResizeStatus.Warnings[0]) | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.