flagger icon indicating copy to clipboard operation
flagger copied to clipboard

Add canaryScalerReplicas in addition of primaryScalerQueries inside autoscalerRef

Open theophilhenry opened this issue 2 years ago • 0 comments

Describe the feature

This feature allows the engineer to scale canary deployment differently from primary, AND the original deployment stays the same (non-invasive). This will allow company that have many replicas to test Canary with a lower amount of replicas, without editing the deployment (Just by adding canaryScalerReplicas in the Canary manifest).

The problem I'm trying to solve

For a company that has many pods, I will need a smaller amount of Canary just to test the readiness of the app. From what I've experimented with Canary, the primaryScalerReplicas will scale the -primary. When I want to use primaryScaleQueries, I need to edit the deployment, which is the problem. For example : Originally, I have 48 pods. I want the canary to have only 2 pods. The step that I would do, to achieve that is,

  1. I need to edit the deployment, to have 2 pods
  2. I need to edit the canary, to have 48 pods In an already production environment, rotating the replicaNumber could resulted in an unknown problem.

Proposed solution

Add a new property called "canaryScalerReplicas" inside "autoscalerRef". With that, Instead of doing 2 action (Instead of rotating the replicaNumber), I have a way to override canaryReplicas, just by editing the Canary manifests (adding canaryScalerReplicas to it).

What I want to happen? Add any considered drawbacks.

Simpler way to edit Canary Replica (Different from primary). I don't think there's a drawback.

Any alternatives you've considered?

none

Is there another way to solve this problem that isn't as good a solution? none

theophilhenry avatar May 16 '23 12:05 theophilhenry