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] Add a change validation for handling field type changes #1246

Open
everettraven opened this issue Sep 10, 2024 · 0 comments · May be fixed by #1269
Open

[CRD Upgrade Safety] Add a change validation for handling field type changes #1246

everettraven opened this issue Sep 10, 2024 · 0 comments · May be fixed by #1269

Comments

@everettraven
Copy link
Contributor

It is considered a breaking change to update the type of a field when upgrading a CRD. We currently do not have an explicit check for this type of change so we get an output similar to:

message: 'validating upgrade for CRD "nginxolm75123s.cache.example.com" failed:
      CustomResourceDefinition nginxolm75123s.cache.example.com failed upgrade safety
      validation. "ChangeValidator" validation failed: version "v1alpha1", field "^.spec.field"
      has unknown change, refusing to determine that change is safe'

We should add a new change validation that explicitly handles this case to improve the UX in identifying the exact reason why a CRD upgrade was rejected and help users make better informed decisions as to if this is a change they are comfortable with going through on their cluster.

This is not a v1.0.0 blocker as it is a QoL improvement and the existing pre-flight check fails closed on an unrecognized change so we aren't causing any harm to a user's cluster with the current state of the check.

@everettraven everettraven linked a pull request Sep 13, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant