[Multi_K8s-Plugin] Traffic Routing#6629
[Multi_K8s-Plugin] Traffic Routing#6629mohammedfirdouss wants to merge 16 commits intopipe-cd:masterfrom
Conversation
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
…ecution logic Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
…urces Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
…pod selector Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
…ration Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
…io traffic routing Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
|
@Warashi For traffic routing, I added Test_generateVirtualServiceManifest as a pure unit test (7 cases, no cluster, no network). But I have a question, the https://github.com/pipe-cd/pipecd/blob/master/pkg/app/pipedv1/plugin/kubernetes/deployment/traffic_test.go#L1600 |
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
…lint Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
…tage Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6629 +/- ##
==========================================
+ Coverage 29.24% 37.95% +8.70%
==========================================
Files 582 12 -570
Lines 62103 664 -61439
==========================================
- Hits 18164 252 -17912
+ Misses 42541 396 -42145
+ Partials 1398 16 -1382 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@Warashi @khanhtc1202 I have enabled |
What this PR does: Adds the
K8S_TRAFFIC_ROUTINGstage to the kubernetes_multicluster plugin.This stage controls what percentage of real user traffic reaches each variant (primary, canary, baseline) across all target clusters in parallel. Two routing methods are supported:
Both methods use errgroup to run concurrently across all deploy targets, consistent with every other stage in this plugin.
Why we need it: Without this stage, canary and baseline pods exist in the cluster but receive no real user traffic. You can deploy a canary and a baseline side by side, but if nothing is hitting them, your metric comparison has no signal.
K8S_TRAFFIC_ROUTINGis what turns "pods that exist" into "pods that receive production traffic", making canary analysis meaningful.Which issue(s) this PR fixes: #6446
Where this fits in the full pipeline:
Does this PR introduce a user-facing change?:
How are users affected by this change: Users can now add
K8S_TRAFFIC_ROUTINGto their pipeline config to route real traffic to canary or baseline variants during analysis. PodSelector works out of the box with any Kubernetes cluster. Istio support requirestrafficRouting.method: istioand a VirtualService manifest in the application directory.Is this breaking change: No.
How to migrate (if breaking change): N/A