operator-framework / operator-controller

A new and improved management framework for extending Kubernetes with Operators
https://operator-framework.github.io/operator-controller/
Apache License 2.0
61 stars 53 forks source link

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

Closed everettraven closed 1 month ago

everettraven commented 2 months ago

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:

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:

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:

trgeiger commented 1 month ago

/assign