-
Notifications
You must be signed in to change notification settings - Fork 738
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
canary: service with multiple ports gets routed to first port declared #263
Comments
Hi @fcantournet
|
Sure ! (also edited the initial post for version)
|
Hmm looks like Istio takes all ports from the ClusterIP definition and maps them to the destination port number when the ClusterIP name matches a virtual service name... The |
To be 100% certain I understand and the intended behavior matches what I want to do (regardless of current potentiel bug) : the intended way is to have clients of Correct ? I suspect the problem to be here : The virtual service actually needs match rules for each port and matching destinations for each port apparently. |
Can you please do the following test: scale Flagger to zero and edit the virtual service: spec:
gateways:
- mesh
hosts:
- places
http:
- route:
- destination:
host: places-primary
port:
number: 8080
weight: 100
- destination:
host: places-canary
port:
number: 8080
weight: 0
- route:
- destination:
host: places-primary
port:
number: 6565
weight: 100
- destination:
host: places-canary
port:
number: 6565
weight: 0 |
Yeah I'll do that test as soon as possible and get back to you 👍 |
Ok So I tried with your yaml and it didn't work. Then I added a match rule with the port and it works as expected now :
|
Hmm ok this complicates things as users can add match conditions to the canary spec. Flagger would need to carefully merge those. Thanks @fcantournet for the report 👍 |
This fixes issue fluxcd#263 We actually don't need to specify any ports in the VirtualService and DestinationRules. Istio will create clusters/listerners for each named port we have declared in the kubernetes services and the router can be shared as it operates only on L7 criterias Also contains a tiny clean-up of imports
This fixes issue fluxcd#263 We actually don't need to specify any ports in the VirtualService and DestinationRules. Istio will create clusters/listerners for each named port we have declared in the kubernetes services and the router can be shared as it operates only on L7 criterias Also contains a tiny clean-up of imports
Fixed by #267 release in v0.18.2 |
TL;DR: canary makes my grpc traffic on
$service.$namespace
go to the http port in a service with 2 ports.I'm using the Canary CRD with a service that exposes 2 ports, one for http and one for grpc :
The Canary CRD :
Following the documentation in the FAQ I have set portDiscovery to
true
.If I query
place-primary.trip:6565
it works as expect and I get the GRPC endpoint (and respectively for 8080 and http)However if I query
places.trip:6565
I end up on the http 8080 port of the pods (instead of the grpc one).istioctl pc route $(k get pods -l app=synapse-trip -o jsonpath='{.items[0].metadata.name}') --name 6565 -o json
As you can see the route in envoy ends up routing grpc traffic on port 6565 to the 8080 cluster for some reason.
I suspect this is a bug.
I'm using version 0.17.0 of flagger and istio 1.1.11
The text was updated successfully, but these errors were encountered: