flagger
flagger copied to clipboard
Simple trigger of rollback via status phase
Describe the feature
A simple mechanism to trigger a rollback on a canary by merely patching status phase
Proposed solution
Similarly to #1252
- Introduce CanaryPhase
pkg/apis/flagger/v1beta1/status.goandpkg/canary/status.go - Update
artifacts/flagger/crd.yamlkustomize/base/flagger/crd.yamlandcharts/flagger/crds/crd.yaml - Add a new condition to trigger
runRollbackHooksorrollbackacrosspkg/controller/scheduler.go - Add a test case on
pkg/controller/webhook_test.goto validate the rollback
Any alternatives you've considered?
There may be other ways to implement it, open to suggestions and i'll be happy to push a PR for it.
@stefanprodan will a PR like this be merged ? Or you have any other implementation idea that u'd like me to take a look?
this should be possible to achieve by patching .status.failedChecks to be >= .spec.threshold.