-
Notifications
You must be signed in to change notification settings - Fork 94
Add AtLatestKnown condition #1517
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
base: main
Are you sure you want to change the base?
Add AtLatestKnown condition #1517
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hjensas The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3c78b02
to
f984331
Compare
844a0a2
to
b9e5bbb
Compare
corev1beta1.OpenStackVersionMinorUpdateAvailable, | ||
corev1beta1.OpenStackVersionMinorUpdateAvailableMessage)) | ||
} else { | ||
instance.Status.Conditions.Set(condition.FalseCondition( |
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.
with this change, the openstackversion won't reach the ready state if there is no update available because it would be always false if there is no update. The ready state can only reached when all sub conditions are true. Or am I miss-read it?
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.
oh no, you are right @stuggi - I pushed another version with a test to check the Ready condition - it should fail functional test with that ... and I'll move this to work in progress.
conditions:
- lastTransitionTime: "2025-06-29T14:07:57Z"
message: at latest known
reason: AtLatestKnown
severity: Info
status: "False"
type: Ready
- lastTransitionTime: "2025-06-29T14:02:40Z"
message: completed
reason: Ready
status: "True"
type: Initialized
- lastTransitionTime: "2025-06-29T14:07:57Z"
message: at latest known
reason: AtLatestKnown
severity: Info
status: "False"
type: MinorUpdateAvailable
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 think it would be helpful to have something "boolean"'ish to check, that won't return an error if I used oc wait.
Proposing a new version with an AtLatestKnown
condition.
An alternative would be a status field, similar to the state
field in Subscription
which is set to UpgradePending
or AtLatestKnown
.
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/22bd08115bd6431cb99394cc02e1d25d ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 45m 44s |
b9e5bbb
to
0b14ebd
Compare
Add a condition to indicate if we are AtLatestKnown version. Condition is set to `True` if `AvailableVersion` == `DeployedVersion`, otherwize not set. With this change we can do: `wait --for condition=MinorUpdateAvailable`, then patch the targetVersion and wait for: `wait --for condition=AtLatestKnown`. It is a nuance, but I think this can be useful for automation using oc wait.
0b14ebd
to
d17be01
Compare
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/51330f04251b488e96a2def653ca6623 ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 44m 15s |
/test openstack-operator-build-deploy-kuttl-4-18 |
recheck |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/71450504151442819a3f0f867d993f81 ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 40m 50s |
Add a condition to indicate if we are AtLatestKnown version.
Condition is set to
True
ifAvailableVersion
==DeployedVersion
, otherwize not set.With this change we can do:
wait --for condition=MinorUpdateAvailable
, then patch the targetVersion and wait for:wait --for condition=AtLatestKnown
.It is a nuance, but I think this can be useful for automation using oc wait.