Add update-target-stage gate annotation - #1913
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ciecierski The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
OpenStackControlPlane CRD Size Report
Threshold reference
|
stuggi
left a comment
There was a problem hiding this comment.
I think we might want to add webhook validation for the annotation values, like validating the annotation value in the ValidateUpdate webhook on OpenStackVersion . If someone sets target-stage=tyop, the webhook rejects the update immediately with a clear error, rather than silently ignoring it and not would run a full update.
The OpenStackVersion already has a webhook. Adding a check like:
if stage, ok := r.Annotations[MinorUpdateTargetStageAnnotation]; ok {
validStages := map[string]bool{...}
if !validStages[stage] {
return Forbidden("invalid target stage")
}
}
|
Build failed (check pipeline). Post ❌ openstack-k8s-operators-content-provider FAILURE in 7m 30s |
49cecea to
1ed02a9
Compare
|
/test functional |
1 similar comment
|
/test functional |
|
What happens if...
Stage D's condition would be reset to |
We have two alternatives either let user set annotation for stage C and let user fix it with fixed oc patch. Or as you mentioned set webook to block user from making this kind of harmless mistake(setting annotations with stage C won't rollback updated containers in stage D) . |
|
/retest-required |
fae4854 to
6bda39d
Compare
|
/retest |
stuggi
left a comment
There was a problem hiding this comment.
in general looks good, just some corner cases commented inline.
4cbffb2 to
2fab0eb
Compare
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 28m 18s |
|
/retest |
|
recheck |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 30m 23s |
|
recheck |
| Log.Info("Returning for ControlPlane minor update reconcile") | ||
| return ctrlResult, nil | ||
| } | ||
| return ctrl.Result{}, nil |
There was a problem hiding this comment.
I think this should return return ctrlResult, nil if ctrlResult != ctrl.Result{} ?
stuggi
left a comment
There was a problem hiding this comment.
on comment inline and if I have not missed it, #1913 (comment) is still open?
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 31m 54s |
2fab0eb to
61cdb70
Compare
9b1280e to
4e565a2
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThis change adds annotation-controlled minor-update stages. It validates stage changes, gates controller reconciliation, records gated conditions, adds functional coverage, and documents staged control-plane and dataplane rollout procedures. ChangesStaged minor-update rollout
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: 🔵 Low · up to The staged-update annotation workflow is implemented, but the operator documentation could cause users to misunderstand which completed stages are valid targets. This bounded documentation risk is mergeable with explicit owner follow-up to correct the wording. Sequence Diagram(s)sequenceDiagram
participant Operator
participant OpenStackVersionWebhook
participant OpenStackVersionController
participant OpenStackControlPlaneController
Operator->>OpenStackVersionWebhook: set update-target-stage annotation
OpenStackVersionWebhook-->>Operator: accept or reject stage change
OpenStackVersionController->>OpenStackControlPlaneController: allow configured rollout stage
OpenStackControlPlaneController->>OpenStackVersionController: report stage completion
OpenStackVersionController-->>Operator: mark next stage Gated or continue update
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/test functional |
all done |
Introduce a core.openstack.org/update-target-stage annotation on OpenStackVersion. When set, the update controller completes all stages up to and including the named stage, marks the next stage as blocked (FalseCondition/Gated), and pauses reconciliation. Removing the annotation or advancing it to a later stage resumes the update. Includes stage-name constants, the gated-message format string, controller logic for all seven stages, functional tests for block/resume/ advance scenarios, webhooks and updated operator documentation. AI-assisted: Cursor (Claude Sonnet 4.6 by Anthropic)
4e565a2 to
8dc73f1
Compare
|
@ciecierski: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@dprince CI failure for functional is: When I run locally the same test: |
|
/test functional |
|
re kuttl - failure: WARN[2026-07-15T09:42:42Z] Found 1 conditions for ClusterClaim: |
|
/test openstack-operator-build-deploy-kuttl-4-18 |
|
/test openstack-operator-build-deploy-kuttl-4-20 |
|
Build failed (check pipeline). Post ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 15m 33s |
Introduce a core.openstack.org/update-target-stage annotation on
OpenStackVersion. When set, the update controller completes all
stages up to and including the named stage, marks the next stage as
blocked (FalseCondition/Gated), and pauses reconciliation.
Removing the annotation or advancing it to a later stage resumes the
update.
AI-assisted: Cursor (Claude Sonnet 4.6 by Anthropic)