On a failed promotion the canary keeps serving, but the traffic may
already have been shifted to the primary by runPromotionTrafficShift
before it started failing. Route all traffic back to the canary and
report the matching canary weight instead of zeroing it.
Addresses review feedback on #1931.
Signed-off-by: Pedram Pourmohammad <eragon.pedy@gmail.com>
When the canary analysis succeeds, Flagger copies the canary pod spec
to the primary and waits for the primary rollout to finish. If the
primary fails to become ready, the non-retriable readiness error
triggered the standard analysis rollback, which routes all traffic to
the primary and scales the canary to zero.
During promotion the primary already runs the new (failing) spec while
the canary is the only healthy copy of the new revision still serving
traffic. Rolling back therefore sends all traffic to the broken primary
and deletes the working canary, taking the application down.
Halt the promotion instead: when the primary is not ready and the canary
is in the Promoting or Finalising phase, mark the rollout as failed and
alert, but keep the canary running and leave routing untouched until the
primary recovers or a corrected revision is applied.
Fixes#1898
Signed-off-by: Pedram Pourmohammad <eragon.pedy@gmail.com>
When skipAnalysis is enabled and the canary is promoted, the
post-rollout webhooks were not being executed. This fix ensures
that runPostRolloutHooks is called in shouldSkipAnalysis, matching
the behavior of the normal promotion path.
Fixesfluxcd/flagger#1195
Signed-off-by: Vishal Kumar Singh <vishal.kr.singh2021@gmail.com>
Since version 1.18 (released in July 2021), Contour supports field
HTTPProxy.spec.ingressClassName as a way to specify ingress class for HTTPProxy.
Using this field allows to avoid problems emerging from improper
annotation cleanup, diffing and copying (see issue #1848).
Signed-off-by: Sergey Ptashnik <nnz1024@gmail.com>
Datadog provider is often meeting API rate limits on bigger
implementations. Datadog Cluster Agent can batch metric queries
and expose them through an endpoint compatible with Kubernetes External
Metrics API.
This implementations allows to use this endpoint and any other server
implementing Kubernetes External Metrics API. Including k8s API server
itself.
Co-authored-by: Johan Lore <johan.lore@decathlon.com>
Co-authored-by: Maxime Véroone <maxime.veroone@decathlon.com>
Signed-off-by: Johan Lore <johan.lore@decathlon.com>
Signed-off-by: Maxime Véroone <maxime.veroone@decathlon.com>
Signed-off-by: Johan Lore <johan.lore@decathlon.com>
When Prometheus returns an HTTP error (4xx/5xx), the error message now
includes the status code and reason phrase. Previously, only the response
body was shown, which made it difficult to diagnose issues like HTTP 403
errors caused by missing authorization policies.
Fixesfluxcd/flagger#1434
Signed-off-by: rohansood10 <rohansood10@users.noreply.github.com>
currently the log line exposes the error, however that's always going to be nil
based on the check just above it. This provides better visibility into the failure reason
Signed-off-by: Erik Miller <erik.miller@gusto.com>
It can take some time for changes to propagate for cloud load balancers,
so flagger should ensure the route changes are current before proceeding
with any more.
Signed-off-by: Steven Davidovitz <sdavidovitz@groq.com>
These are labels and annotations that should be ignored by Flagger
(i.e. not overwritten upon reconciliation).
See: github.com/fluxcd/flagger/issues/1573
Signed-off-by: Brian Sonnenberg <bsonnenberg@google.com>