-
Notifications
You must be signed in to change notification settings - Fork 887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adding support for defining max destination weights in Istio VS #1420
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,8 @@ spec: | |
virtualService: | ||
# Reference to a VirtualService which the controller updates with canary weights | ||
name: rollouts-demo-vsvc | ||
# Optional if there are only two destinations in your routes or if you want to split 100% traffic between stable and canary services. If specified, this will be used as an upper bound for traffic between canary + stable services. | ||
maxWeight: 80 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR adds maxWeight prop at the level of the virtualService, therefore it will affect all the routes ArgoRollouts manage - which are specified in strategy.canary.trafficRouting.istio.virtualService.routes While in our use case we'd want only specific routes to have less then 100 weight managed by ArgoRollouts.
What do you think? (maybe we can move the maxWeight to the level of the strategy.canary.trafficRouting.istio.virtualService.routes. Or remove maxWeight and configure ArgoRollouts to manage only the first 2 destinations in founds in a route...) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no straightforward way to do it at the per-route level. Currently, One proposal is to add an optional @jessesuen @huikang Any suggestions on what would be the best way to move forward here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @agrawroh, I am interested in coming up with a solution for this as well. I would like to reopen this PR or something similar to support this feature. @jessesuen @huikang are there any suggestions for moving forward ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dnguy078 Sure, that'd be great. Please feel free to take it over or let me know how I can help. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dnguy078 any update? This is a pretty big blocker for argo-rollouts adoption on our end. Also note that even though this PR was not addressing this exact issue, it would have been incredibly helpful for single route virtual service. |
||
# Optional if there is a single HTTP route in the VirtualService, otherwise required | ||
routes: | ||
- http-primary | ||
|
@@ -71,11 +73,14 @@ spec: | |
- name: http-primary # Should match spec.strategy.canary.trafficRouting.istio.virtualService.routes | ||
route: | ||
- destination: | ||
host: rollouts-demo-stable # Should match spec.strategy.canary.stableService | ||
weight: 100 | ||
host: rollouts-demo-stable # Should match rollout.spec.strategy.canary.stableService | ||
weight: 80 | ||
- destination: | ||
host: rollouts-demo-canary # Should match spec.strategy.canary.canaryService | ||
weight: 0 | ||
- destination: | ||
host: rollouts-demo-legacy | ||
weight: 20 | ||
tls: | ||
- match: | ||
- port: 3000 # Should match the port number of the route defined in spec.strategy.canary.trafficRouting.istio.virtualService.tlsRoutes | ||
|
@@ -84,11 +89,14 @@ spec: | |
- localhost | ||
route: | ||
- destination: | ||
host: rollouts-demo-stable # Should match spec.strategy.canary.stableService | ||
weight: 100 | ||
host: rollouts-demo-stable # Should match rollout.spec.strategy.canary.stableService | ||
weight: 80 | ||
- destination: | ||
host: rollouts-demo-canary # Should match spec.strategy.canary.canaryService | ||
weight: 0 | ||
- destination: | ||
host: rollouts-demo-legacy | ||
weight: 20 | ||
``` | ||
|
||
Run the following commands to deploy: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -368,6 +368,8 @@ type IstioTrafficRouting struct { | |
VirtualService IstioVirtualService `json:"virtualService" protobuf:"bytes,1,opt,name=virtualService"` | ||
// DestinationRule references an Istio DestinationRule to modify to shape traffic | ||
DestinationRule *IstioDestinationRule `json:"destinationRule,omitempty" protobuf:"bytes,2,opt,name=destinationRule"` | ||
// Max weight that will be split between canary and stable services. If unset, it defaults to 100. | ||
MaxWeight int64 `json:"maxWeight,omitempty" protobuf:"bytes,3,opt,name=maxWeight"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing |
||
} | ||
|
||
// IstioVirtualService holds information on the virtual service the rollout needs to modify | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like we are overusing the example in the getting-started page. Can we move this advanced use to https://argoproj.github.io/argo-rollouts/features/traffic-management/istio/ and leave the getting-started example straightfoward. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense. Will update!