(feat): Status Conditions for ValkeyCluster#33
Merged
sandeepkunusoth merged 14 commits intoDec 25, 2025
Merged
Conversation
Signed-off-by: Sandeep Kunusoth <sandeepkunsoth000@gmail.com>
Signed-off-by: Sandeep Kunusoth <sandeepkunsoth000@gmail.com>
Signed-off-by: Sandeep Kunusoth <sandeepkunsoth000@gmail.com>
bjosv
reviewed
Dec 19, 2025
bjosv
reviewed
Dec 19, 2025
Collaborator
bjosv
left a comment
There was a problem hiding this comment.
Some initial minor comments/questions
bjosv
reviewed
Dec 22, 2025
bjosv
reviewed
Dec 23, 2025
Collaborator
bjosv
left a comment
There was a problem hiding this comment.
Just a last question about the return after setting slots not assigned status
bjosv
reviewed
Dec 25, 2025
Collaborator
bjosv
left a comment
There was a problem hiding this comment.
Found two comments but then I'm happy.
Signed-off-by: Sandeep Kunusoth <sandeepkunsoth000@gmail.com>
hieu2102
pushed a commit
to hieu2102/valkey-operator
that referenced
this pull request
Jan 7, 2026
This PR enhances ValkeyCluster status (valkey-io#26) by updating status metadata and status.conditions on every reconciliation. It also updates E2E tests to cover: (Success) provisioning a ValkeyCluster and asserting it reaches Ready with the expected condition, and (Negative) simulating shard loss by deleting a shard deployment to force Degraded state and verifying the Degraded/Ready conditions are set as expected. --------- Signed-off-by: Sandeep Kunusoth <sandeepkunsoth000@gmail.com> Signed-off-by: hieu2102 <hieund2102@gmail.com>
bjosv
added a commit
to Nordix/valkey-operator
that referenced
this pull request
May 10, 2026
updateStatus fetched the latest cluster object for change detection but then called Status().Update() on the stale in-memory object from the start of Reconcile. When the ValkeyNode controller updates node status concurrently, the cluster's resourceVersion advances, causing the stale update to fail with "the object has been modified". These conflicts cascade: each failed status update requeues the reconcile, delaying cluster formation and causing transient connectivity errors (i/o timeout, connection refused) as pods get recreated. Fix by applying the desired conditions to the freshly-fetched object and updating that instead. Sync the result back to the caller so subsequent logic in the same reconcile sees the current resourceVersion. Bug introduced in be52c44 (Status Conditions for ValkeyCluster valkey-io#33), became a problem after 89eb055 (ValkeyNode integration) added a second controller that concurrently modifies cluster state. Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
bjosv
added a commit
to Nordix/valkey-operator
that referenced
this pull request
May 10, 2026
updateStatus fetched the latest cluster object for change detection but then called Status().Update() on the stale in-memory object from the start of Reconcile. When the ValkeyNode controller updates node status concurrently, the cluster's resourceVersion advances, causing the stale update to fail with "the object has been modified". These conflicts cascade: each failed status update requeues the reconcile, delaying cluster formation and causing transient connectivity errors (i/o timeout, connection refused) as pods get recreated. Fix by applying the desired conditions to the freshly-fetched object and updating that instead. Sync the result back to the caller so subsequent logic in the same reconcile sees the current resourceVersion. Bug introduced in be52c44 (Status Conditions for ValkeyCluster valkey-io#33), became a problem after 89eb055 (ValkeyNode integration) added a second controller that concurrently modifies cluster state. Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
bjosv
added a commit
to Nordix/valkey-operator
that referenced
this pull request
May 10, 2026
updateStatus fetched the latest cluster object for change detection but then called Status().Update() on the stale in-memory object from the start of Reconcile. When the ValkeyNode controller updates node status concurrently, the cluster's resourceVersion advances, causing the stale update to fail with "the object has been modified". These conflicts cascade: each failed status update requeues the reconcile, delaying cluster formation and causing transient connectivity errors (i/o timeout, connection refused) as pods get recreated. Fix by applying the desired conditions to the freshly-fetched object and updating that instead. Sync the result back to the caller so subsequent logic in the same reconcile sees the current resourceVersion. Bug introduced in be52c44 (Status Conditions for ValkeyCluster valkey-io#33), became a problem after 89eb055 (ValkeyNode integration) added a second controller that concurrently modifies cluster state. Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR enhances ValkeyCluster status (#26) by updating status metadata and status.conditions on every reconciliation. It also updates E2E tests to cover: (Success) provisioning a ValkeyCluster and asserting it reaches Ready with the expected condition, and (Negative) simulating shard loss by deleting a shard deployment to force Degraded state and verifying the Degraded/Ready conditions are set as expected.