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

Add configuration options to CRD Upgrade Safety preflight check for error/warn modes and failing open/closed. #668

Closed
everettraven opened this issue Feb 27, 2024 · 1 comment
Labels
epic/crd-upgrade-safety Marks an issue as part of the CRD Upgrade Safety epic

Comments

@everettraven
Copy link
Contributor

everettraven commented Feb 27, 2024

This builds on top of #661 and #667, focusing on adding configuration options to the crd upgrade safety preflight check.

The configuration options are as follows:

  • mode - allowed values: ["error", "warn"] - This is the mode that should be used when running the preflight check. When run in the error mode, this check will fail if any problems are found with upgrading a CRD and prevent the changes from being applied to the cluster. When run in warn mode, this check will always succeed, but log warnings for any problems found. The warn mode allows users to be aware of potential problems but proceed with applying the changes to the cluster if all other enabled preflight checks pass. error is the default.
  • failMode - allowed values: ["open", "closed"] - This is the failure mode that should be used when running the preflight check. Only used when mode=error. When running in the open mode, if a change to an existing field is not validated by an existing check the preflight check will pass. When running in the closed mode, all changes to an existing field must be validated by an existing check. If it has not, the preflight check will fail with a message along the lines of "unable to determine if change to existing field is safe ...". closed is the default.

If the proposal for adding this functionality to carvel-dev/kapp has been accepted prior to starting this work, all changes should be made against carvel-dev/kapp, otherwise the changes should be made against https://github.com/everettraven/kapp/tree/feature/crd-upgrade-safety-preflight

@everettraven
Copy link
Contributor Author

Closing this as we are no longer building on top of the carvel tool suite and OLM v1's current use case is to always fail closed to allow for adding validations without them being a breaking change (i.e new validations is always a loosening of restrictions). This logic was proposed to better accommodate potential use cases for users of Carvel's kapp tooling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic/crd-upgrade-safety Marks an issue as part of the CRD Upgrade Safety epic
Projects
Archived in project
Development

No branches or pull requests

1 participant