-
Notifications
You must be signed in to change notification settings - Fork 100
Track CustomContainerImages and prevent minor updates w/o images updates #1569
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
Track CustomContainerImages and prevent minor updates w/o images updates #1569
Conversation
|
letting CI run before I mark as draft. This is missing code to allow the user to override the restriction if they want to, essentially forcing the change regardless of the warning if they wish |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/3226a8e13a484ce28308f2ef50e3fec7 ✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 17m 27s |
a760b91 to
d5224a3
Compare
d5224a3 to
a4cbd4c
Compare
dc96ab3 to
7730fca
Compare
7730fca to
2a416d7
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/332b4e1f7f764474aa85e40e1132f0ba ❌ openstack-k8s-operators-content-provider POST_FAILURE in 3h 24m 09s |
for safety mechanism I think that makes sense. We'd have to document that behavior in minor updates doc. |
…hanges Add tracking and validation to ensure CustomContainerImages are updated when changing targetVersion during minor updates: - Add TrackedCustomImages field to OpenStackVersionStatus to track CustomContainerImages used for each version - Implement validation webhook logic to prevent targetVersion updates when CustomContainerImages remain unchanged from previous version - Add helper functions for deep comparison of CustomContainerImages - Update controller to automatically track CustomContainerImages for each processed target version - Generate updated CRD manifests with new tracking field This prevents inconsistent deployments where users update the target version but forget to update associated custom container images, ensuring proper version tracking and validation during minor updates. Users can skip all validations related to this commit by setting the core.openstack.org/skip-custom-images-validation metadata annotations. Co-Authored-By: Claude <[email protected]> Jira: OSPRH-19183
2a416d7 to
e97685d
Compare
| instance.Status.DeployedVersion = &instance.Spec.TargetVersion | ||
|
|
||
| // Remove skip-custom-images-validation annotation after minor update completion | ||
| if instance.Annotations != nil { |
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.
Won't this remove the annotation on any reconcile when the ctlplane is ready, not just when a minor update finished? Like I do the minor update, it finishes, after that I want to re-add the condition. Maybe we should do it above after the dataplane got the minor update?
instance.Status.Conditions.MarkTrue(
corev1beta1.OpenStackVersionMinorUpdateDataplane,
corev1beta1.OpenStackVersionMinorUpdateReadyMessage)
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.
it would only remove the annotation if targetVersion != availableVersion. My intention with the annotation is that you would set it only when enabling a minor update. If we move it above after the dataplane gets update it is possible someone could set the annotation at anytime and it would persist until the next minor update and then it would skip the check blindly.
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.
right, thanks for clarification
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprince, stuggi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
1 similar comment
|
/retest |
|
/retest |
1 similar comment
|
/retest |
70a918b
into
openstack-k8s-operators:main
Add tracking and validation to ensure CustomContainerImages are updated when changing targetVersion during minor updates:
This prevents inconsistent deployments where users update the target version but forget to update associated custom container images, ensuring proper version tracking and validation during minor updates.
Co-Authored-By: Claude [email protected]
Jira: OSPRH-19183