Commit Graph
26 Commits
Author SHA1 Message Date
Pedram Pourmohammad 8eaa0408af Keep canary alive when primary promotion fails
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>
2026-06-27 19:56:03 +03:30
Niklas Ott af2436ef1d hpa: remove v2beta2 support
autoscaling/v2beta2 has been deprecated since [kubernetes 1.26](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#horizontalpodautoscaler-v126) and been [removed for kubernetes 1.36](https://github.com/kubernetes/kubernetes/pull/135615)
This commit removes the hpa fallback to v2beta2 if v2 did not work

Signed-off-by: Niklas Ott <niklas.ott@unwired.at>
2026-05-21 11:13:46 +02:00
kahirokunn 56200f6d0f fix: correct typo in AutoscalerReference type name
- Fix spelling of AutoscalerReference (was AutoscalerRefernce) in type definition and struct field

Signed-off-by: kahirokunn <okinakahiro@gmail.com>
2025-10-07 18:28:04 +09:00
Thomas Banksandlnx01 f1c8807c0d feat: add knative integration
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Co-authored-by: Thomas Banks
2025-03-22 01:02:30 +05:30
Benoit Gaillard 217db66a5e make flagger use apiversion v1beta1 for istio VirtualService and DestinationRule instead of v1alpha1
Signed-off-by: Benoit Gaillard <benoit.gaillard@continental-corporation.com>
2024-02-28 15:09:40 +01:00
LiZhenCheng9527 d618cfcedd fix ut failed
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
2024-01-18 16:52:18 +08:00
Nelson Johnstone 27eb21ecc8 Support custom variables on metric templates
Signed-off-by: Nelson Johnstone <93178586+njohnstone2@users.noreply.github.com>
2023-02-08 11:41:52 +10:00
Sanskar Jaiswal 6a1b765a77 add unit tests for ScaledObjectReconciler
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-09 21:38:10 +05:30
Sanskar Jaiswal 8c690d1b21 avoid setting owner refs if the service mesh cluster is different
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-06 01:06:03 +05:30
Sanskar Jaiswal 7df1beef85 Add flag to disable cross namespace refs to AlertProviders and MetricTemplates
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-04-27 17:09:07 +05:30
Stefan Prodan cd75c5fa25 Copyright Flux authors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 19:44:52 +02:00
Stefan Prodan 90abb7ba5b Rename imports to fluxcd/flagger
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 19:02:23 +02:00
Fernando Teixeira afc063ae9a update tests to use autoscaling/v2beta2 2020-12-06 15:23:08 -05:00
Daniel Albuquerque 5ca5647fab Remove refs to jenkins 2020-10-13 22:01:49 +01:00
Daniel Albuquerque 23e59168af Exclude controller labels by prefix 2020-10-11 14:10:16 +01:00
mathetake 5d84596bc0 pkg/controller: check metrics server's availability during initalization 2020-05-15 19:35:40 +09:00
stefanprodan 48467eb8b3 Add ingress class support for Contour
Add `-ingress-class` command flag. When set, the specified class is used to annotate the generated HTTPProxy objects.
2020-05-14 12:17:03 +03:00
stefanprodan 854d7665f0 Add AppMesh v1beta2 to factories 2020-05-08 13:15:37 +03:00
sayboras c0515fc6ff Upgrade to kube 1.18 2020-04-04 23:46:38 +11:00
mathetake 65d4b28b58 pkg/{canary,controller}: remove unused skipLivenessChecks 2020-03-28 18:13:00 +09:00
mathetake f0bd307d3c fix: nil pointer on notifier 2020-03-15 18:44:05 +09:00
mathetake 1f6160148c change CanaryAnalysis to Analysis left in tests 2020-03-10 11:25:57 +09:00
mathetake 22f860a3a3 refactor pkg/controller 2020-03-08 16:06:53 +09:00
stefanprodan 287977c2b5 Deprecate spec.canaryAnalysis replaced by spec.analysis
- 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
2020-02-28 11:24:38 +02:00
mathetake 9c8b887d30 use LastTransitionTime for deadline calculation
and run goimports on several files
2020-02-26 12:57:26 +09:00
mathetake 5af1665ef8 pkg/controller: add unit test for daemonset target 2020-02-23 13:39:11 +09:00