flagger icon indicating copy to clipboard operation
flagger copied to clipboard

Simple trigger of rollback via status phase

Open fblgit opened this issue 2 years ago • 2 comments

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.go and pkg/canary/status.go
  • Update artifacts/flagger/crd.yaml kustomize/base/flagger/crd.yaml and charts/flagger/crds/crd.yaml
  • Add a new condition to trigger runRollbackHooks or rollback across pkg/controller/scheduler.go
  • Add a test case on pkg/controller/webhook_test.go to 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.

fblgit avatar Jul 25 '23 11:07 fblgit

@stefanprodan will a PR like this be merged ? Or you have any other implementation idea that u'd like me to take a look?

fblgit avatar Jul 27 '23 09:07 fblgit

this should be possible to achieve by patching .status.failedChecks to be >= .spec.threshold.

aryan9600 avatar Jul 31 '23 12:07 aryan9600