Implement flagger_canary_successes_total and flagger_canary_failures_total
counter metrics with deployment strategy detection and analysis status
tracking for better observability of canary deployment outcomes.
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
Enhance existing scheduler tests for deployments, daemonsets, and
services by adding prometheus metrics verification using testutil.
This ensures that status metrics are correctly recorded during
canary promotion workflows and provides better test coverage for
the metrics recording functionality.
Signed-off-by: cappyzawa <cappyzawa@gmail.com>
Modify `canary.IsPrimaryReady()` and `canary.Initialize()` to return a
boolean indicating if the error is retriable. Modify the scheduler to
rollback the analysis and mark the Canary object as failed if the above
two functions or `canary.IsCanaryRead()` returns false along with an
error.
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
This adds a new Checksum field to the canary webhook body, which is a
hash of the LastAppliedSpec and TrackedConfigs.
This can be used to identify the rollout of a specific configuration,
and differentiate between webhooks being sent for different
configuration and deployment versions.
Signed-off-by: Kevin McDermott <kevin@weave.works>
Suspend, if set to true will suspend the Canary, disabling any canary runs
regardless of any changes to its target, services, etc. Note that if the
Canary is suspended during an analysis, its paused until the Canary is unsuspended.
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Run the `confirm-rollout` webhook check right before scaling up the
deployment only, instead of running it on every loop.
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Prevents the canary from getting triggered, when a canary deploy is
updated to match the primary deploy after an analysis fails.
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
- add analysis field to Canary spec
- deprecate canaryAnalysis filed (to be removed in the next API version)
- maintain backwards compatibility with v1alpha3 by using spec.canaryAnalysis if spec.analysis is nil
- set analysis threshold default value to 1