-
Notifications
You must be signed in to change notification settings - Fork 522
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
MCO-820: Add boot images update opt-in mechanism #1672
MCO-820: Add boot images update opt-in mechanism #1672
Conversation
Hello @djoshy! Some important instructions when contributing to openshift/api: |
804737f
to
6efc17d
Compare
6efc17d
to
5952155
Compare
5952155
to
6837787
Compare
6837787
to
f36270a
Compare
1688711
to
bb4ff6d
Compare
bb4ff6d
to
3ee2435
Compare
So with this new approach, we still have have three modes:
We could then add any future configurations as new fields in the |
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.
Thinking about the shape of the union, I'm wondering if CustomConfig
is one level too many. What would go alongside a MachineSetSelector? Whatever it is, it would have to work in tandem with the selector. An exclusions list perhaps?
Either way, I think Custom is too broad. We do have the option of adding more enum values to the discriminator later, so perhaps for now having the selector is a better discriminator.
Or perhaps we go for something like:
managedBootImages:
managedImages: None | Partial | All
partial:
machineSetSelector: ...
controlPlaneMachineSetSelector: ... <- a potential future addition?
If we take that route, I guess then machineSetSelector
doesn't need to be required, but we should include a validation that partial
contains at least one non-empty property using the MinItems
validation
3ee2435
to
342f64d
Compare
I've updated the struct to follow the shape mentioned in the comment here: #1672 (comment) |
/test e2e-gcp /test e2e-azure |
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.
Few formatting things and a question on one of the validations to work out
cbbc1a9
to
90d147e
Compare
Updated to:
|
Ok, from an API perspective I'm happy with this now, I would like to take a final pass over the enhancement before we merge as well @yuqi-zhang I believe you've been reviewing the EP, are you happy with the shape of this API? |
/test e2e-upgrade |
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.
Looked over the managedbootimages commit again, and the current API lgtm!
9f36019
to
576ec0c
Compare
Updated based on discussion from the enhancement:
|
576ec0c
to
247d3e0
Compare
@djoshy: This pull request references MCO-820 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.16.0" version, but no target version was set. In response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: djoshy, JoelSpeed, yuqi-zhang 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 |
/override ci/prow/verify-crd-schema Introduction fo techpreview/custom versions of CRDs has caused some pre-existing failures that cannot be fixed |
@JoelSpeed: Overrode contexts on behalf of JoelSpeed: ci/prow/verify-crd-schema In response to this:
Instructions 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/test-infra repository. |
/retest-required |
@djoshy: all tests passed! Full PR test history. Your PR dashboard. Instructions 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/test-infra repository. I understand the commands that are listed here. |
[ART PR BUILD NOTIFIER] This PR has been included in build ose-cluster-config-api-container-v4.16.0-202402281710.p0.g217662e.assembly.stream.el9 for distgit ose-cluster-config-api. |
In addition to the feature gate that will be added by #1646, we'd also like to add a secondary opt-in knob for the user to toggle the boot image update mechanism. We expect that some users would want to keep their boot images static and this will serve as the primary switch when this feature leaves tech preview.
This PR introduces a new struct in types_machineconfiguration.go,
ManagedBootImages
which encloses an array ofMachineManager
objects. AMachineManager
object contains the resource type of the machine management object that is being opted-in, the API group of that object and a union discriminant object of the typeMachineManagerSelector
. This objectMachineManagerSelector
encloses:Mode
, can be set to three values :All
,Partial
andNone
.Partial
This is a label selector that will be used by objects to opt-in. When theMode
is set toPartial
mode, all machinesets in the selector list would be considered enrolled for updates. For all other values ofMode
, this selector does not exist.Here is a YAML snippet of what this config could look like
The above YAML would provide a label selector for enrolling Cluster API MachineSets and all Machine API MachineSets. Only one machineManager per unique pair of resource/APIGroup will be accepted. This is to avoid conflicting instructions provided by multiple machineManagers.
We may also add future configuration points to
ManagedBootImages
. This PR also adds a new degrade condition to theMachineConfigPool
CRD. This will be used by the new subcontroller to signal a failure in updating boot images.More details about this feature can be found in enhancement #1496. Comments welcome!