FR: Support spec.skipAnalysis attribute value from Deployment annotations
Describe the feature
It is obvious that sometimes you need to deploy straight to production. Flagger offers this functionality with spec.skipAnalysis attribute.
In order to enable that, the user needs to patch the Canary resource before or during the deployment of an emergency fix. They also needs to remember enabling it after.
This is a challenge for systems that aren't ready for CD tools, where deployments are triggered by Operators and aren't driven by Git repository.
What if, instead of patching the Canary resource Flagger API would support annotations on deployment resource? something like this would be possible:
helm upgrade -i myapp --set deployment.annotations."flagger\.app/skipAnalysis"=true
This has few advantages:
- The user simply patch a specific deployment without modifying the Canary resource
- The user don't need to change it back the once the emergency is over
- Much easier to integrate with CI systems, as you simply add a checkbox for "skipAnalysis" and append CLI options.
- Easier for operators to grasp, if they weren't the ones who set up Flagger
This can be added to today's behavior so it won't change the current behavior and eliminate any drawbacks.
The logic:
- Check
.spec.skipAnalysis - If false: Check deployment annotations
- Rest is the same