Skip to content
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

[WIP] Attempt at feature-gating the default image choice #3313

Conversation

jkyros
Copy link
Contributor

@jkyros jkyros commented Aug 25, 2022

  • I was trying to find a good way to "soft" gate the default behavior of defaulting to the new format image ( per [WIP] Teach MCO to use the new-format image by default  #3258)

  • It occurred to me that it needed to be gated both during bootstrap and during live operation and I was basically re-implementing feature gates poorly, so I figured maybe I should just try to use them.

  • This is just trying to see what it feels like to have the controller bootstrap and "live" render controller react to feature gates.

  • I thought about just pushing the featuregates into controllerconfig (they currently only make it into renderconfig right now), but:

    • some of our other controllers already look directly at the feature gates
    • we'd have to weirdly merge featuregates also into controllerconfig during bootstrap
    • so I shied away from doing that unless we want to decide something like "controllers will always read featuregates from controllerconfig".
  • I think I'm probably"cheating" by "soft" using featuregates since I don't actually require a featureset be enabled

This does seem to work though -- if you set the featuregate at installtime (e.g. openshift-install create manifests and putting something like

kind: FeatureGate
metadata:
  name: cluster
spec:
  customNoUpgrade:
    enabled:
    - MCONewContainerImageFormat

in the manifests folder.

This pushes feature gate detection through into the render controller so
it can use them to decide whether it should prefer the new format
container image or not.

This also adds a helper to figure out if a given feature gate is
enabled.

This currently does *not* re-queue the pool if a feature gate changes,
it only checks what's there when it's time to render a config.
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 25, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jkyros

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 25, 2022
@cgwalters
Copy link
Member

Offhand I feel like preventing upgrades is unnecessary here and actually actively breaks testing out what we're trying to accomplish. We definitely want to be able to test maintaining an override for the OS while upgrading OCP.

@cgwalters
Copy link
Member

We had a realtime chat on this and briefly I'd summarize my end point of view is that we should instead add a machineConfigOperatorFeatures: ["custom-os-override"] or so that's part of MachineConfig. A nice aspect about this is that it's more clearly per-pool; distinguishing between e.g. control plane versus workers or even a subset of workers.

@jlebon
Copy link
Member

jlebon commented Aug 25, 2022

If the goal is to gate at the pool level, would it belong better as part of the MachineConfigPool CRD instead?

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 6, 2022

@jkyros: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-agnostic-upgrade 99f9788 link true /test e2e-agnostic-upgrade
ci/prow/bootstrap-unit 99f9788 link false /test bootstrap-unit
ci/prow/e2e-aws 99f9788 link true /test e2e-aws
ci/prow/verify 99f9788 link true /test verify
ci/prow/e2e-gcp-op 99f9788 link true /test e2e-gcp-op
ci/prow/okd-scos-images 99f9788 link true /test okd-scos-images

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.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 6, 2022
@openshift-merge-robot
Copy link
Contributor

@jkyros: PR needs rebase.

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.

@cgwalters
Copy link
Member

I think at this point we aren't going to do this, so closing just to clear up the large MCO PR queue. (But like a lot of things I know there's been some back and forth, obviously please do reopen if I'm wrong or this changes)

@cgwalters cgwalters closed this Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants