Add validation to `CRDUpgradeSafety` preflight check to allow decreasing minimum values on existing fields
everettraven opened this issue · comments
Now that there is a base CRDUpgradeSafety
preflight check in place, we can continue adding validation logic based on the CRDUpgradeSafety
preflight check proposal.
This issue focuses on adding a validation to ensure that updates to an existing field are allowed when the update performed is a decrease in the minimum allowed values.
As a potential source of inspiration, here is how a couple of the existing validations are implemented:
- Definitions:
kapp/pkg/kapp/crdupgradesafety/validator.go
Lines 71 to 93 in 82f2a30
- Consumption:
kapp/pkg/kapp/crdupgradesafety/preflight.go
Lines 36 to 39 in 82f2a30
Note
It may be useful to consider a more generic check that allows for easily extending the validations that are run against updates to existing fields in a CRD schema