argoproj / argo-rollouts

Progressive Delivery for Kubernetes
https://argo-rollouts.readthedocs.io/
Apache License 2.0
2.68k stars 839 forks source link

Granular control of weight when using traffic routing #2657

Open mvgmb opened 1 year ago

mvgmb commented 1 year ago

Summary

When using traffic routing with canary, the stable scale is always 100 - canary scale. This restricts the minimum percentage of routed traffic greater than zero to 1%. However, ingresses are capable of more granular control over traffic.

For example, AWS ALB allows weights from 0 to 999, enabling a minimum of ~0.1% (canaryWeight=1 stableWeight=999) to be routed to the canary.

To avoid issues related setStableScale in a canary step (https://github.com/argoproj/argo-rollouts/issues/1029#issuecomment-901349817), my proposition is to be able to set the stable scale initial weight. Therefore, the stable scale can still be dynamically scaled down as the canary scale is scaled up.

Use Cases

For example, setting the initial stable scale weight to 200, it'd allow me to route ~0.5% of the traffic to the canary:

spec:
  strategy:
    canary:
      stableInitialScale:
        weight: 200
      steps:
        - setWeight: 1 # canaryWeight=1 (~0.5%) stableScale=199 (~99.5%)
        - pause:
            duration: 5m
        - setWeight: 50 # canaryWeight=50 (25%) stableScale=150 (75%)
        - pause:
            duration: 5m

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity.

andyliuliming commented 9 months ago

I'm trying to resolve this in #3215

kostis-codefresh commented 1 month ago

@mvgmb PR https://github.com/argoproj/argo-rollouts/pull/3215 was merged. Does this solve your issue?