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

CRD Upgrade Safety preflight checks should check for incompatibility between served versions #1091

Closed
Tracked by #950
everettraven opened this issue Aug 1, 2024 · 1 comment · Fixed by #1191
Closed
Tracked by #950
Assignees
Labels
bug/release-blocker issue identified as something which should be solved before we can release a new version v1.0 Issues related to the initial stable release of OLMv1
Milestone

Comments

@everettraven
Copy link
Contributor

everettraven commented Aug 1, 2024

After speaking with folks more familiar with the nuances of CRD management, we need to update the CRD Upgrade Safety preflight check to add a check that for new instances of the CRD only:

  • Checks compatibility across all served versions, failing if there is incompatibility
  • Fails if incompatibility is found AND no conversion strategy is specified
  • Passes if conversion webhook is specified as the conversion strategy

For historical context the previous description of this issue is saved below. It can be used to get clarity on the original concern, but all that is needed for implementation is what is mentioned above.

History

The existing CRD Upgrade Safety preflight checks are limited to checking for breaking changes across existing versions of a CRD (i.e old v1alpha1 vs new v1alpha1), but would not handle the following case:

  • CRD Foo v1alpha1 has optional field bar, required field baz and is a stored version
  • CRD Foo v1alpha2 is introduced and only has required field bar
  • No conversion strategy is specified

Any instances of the v1alpha1 API would be unable to successfully convert to the v1alpha2 API, thus invalidating any instances of v1alpha1 in etcd.

We need to add a validation to the CRD Upgrade Safety preflight check that:

  • Checks for breaking changes between existing stored versions (from the old CRD status), and served versions (from the new CRD)
  • Returns an error if any breaking changes are found and a conversion strategy is NOT specified
    • If a conversion strategy is specified we could log and/or add an event to warn (similar to OLMv0) or do nothing
@everettraven everettraven added the v1.0 Issues related to the initial stable release of OLMv1 label Aug 1, 2024
@everettraven everettraven added this to the v1.0.0 milestone Aug 20, 2024
@everettraven everettraven added the bug/release-blocker issue identified as something which should be solved before we can release a new version label Aug 20, 2024
@trgeiger
Copy link
Contributor

/assign

@rashmigottipati rashmigottipati moved this to Implementing in OLM v1 Aug 28, 2024
@everettraven everettraven changed the title CRD Upgrade Safety preflight checks should catch backwards incompatible changes between stored versions and served versions of a CRD CRD Upgrade Safety preflight checks should check for incompatibility between served versions Aug 28, 2024
trgeiger added a commit to trgeiger/operator-controller that referenced this issue Aug 28, 2024
New preflight check that checks for either the presence of the "Webhook"
conversion strategy to pass, or checks for any incompatible changes
between served versions in the new CRD which, if found, causes failure..

Closes operator-framework#1091

Signed-off-by: Tayler Geiger <[email protected]>
trgeiger added a commit to trgeiger/operator-controller that referenced this issue Aug 29, 2024
New preflight check that checks for either the presence of the "Webhook"
conversion strategy to pass, or checks for any incompatible changes
between served versions in the new CRD which, if found, causes failure..

Closes operator-framework#1091

Signed-off-by: Tayler Geiger <[email protected]>
trgeiger added a commit to trgeiger/operator-controller that referenced this issue Aug 30, 2024
New preflight check that checks for either the presence of the "Webhook"
conversion strategy to pass, or checks for any incompatible changes
between served versions in the new CRD which, if found, causes failure..

Closes operator-framework#1091

Signed-off-by: Tayler Geiger <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Aug 30, 2024
New preflight check that checks for either the presence of the "Webhook"
conversion strategy to pass, or checks for any incompatible changes
between served versions in the new CRD which, if found, causes failure..

Closes #1091

Signed-off-by: Tayler Geiger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/release-blocker issue identified as something which should be solved before we can release a new version v1.0 Issues related to the initial stable release of OLMv1
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants