carvel-dev / carvel-dev/kapp

Add no new required field validation to `CRDUpgradeSafety` preflight check

Open
#911 0 comments 0 reactions 0 assignees View on GitHub
carvel accepted enhancement
Dominant language
Go
Stars
1.1k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

Now that there is a base `CRDUpgradeSafety` preflight check in place, we can continue adding validation logic based on the [`CRDUpgradeSafety` preflight check proposal](https://github.com/carvel-dev/carvel/blob/develop/proposals/kapp/001-crd-upgrade-safety/README.md).

This issue focuses on adding a validation to ensure that no new _required_ fields are added to a particular version of a CRD's schema during an upgrade operation.

As a potential source of inspiration, here is how a couple of the existing validations are implemented:
- Definitions: https://github.com/carvel-dev/kapp/blob/82f2a30f59c60b85039a921c39ac9df23f1cb3af/pkg/kapp/crdupgradesafety/validator.go#L71-L93
- Consumption: https://github.com/carvel-dev/kapp/blob/82f2a30f59c60b85039a921c39ac9df23f1cb3af/pkg/kapp/crdupgradesafety/preflight.go#L36-L39

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.