This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 125
Specify service port in TrafficSplit #14
Comments
Hey @stefanprodan not sure how Istio configures things, just grokking the docs, but wondering if this information should not be obtained from service discovery. The service in question would be an Envoy proxy, not a kubernetes service. |
Both Istio and App Mesh rely on ClusterIPs to define backends: Istio: apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: frontend
namespace: test
spec:
hosts:
- frontend
http:
route:
- destination:
host: frontend-primary
port:
number: 9898
weight: 100
- destination:
host: frontend-canary
port:
number: 9898
weight: 0 App Mesh: apiVersion: appmesh.k8s.aws/v1alpha1
kind: VirtualNode
metadata:
name: frontend
namespace: test
spec:
meshName: global.appmesh-system
listeners:
- portMapping:
port: 9898
protocol: http
serviceDiscovery:
dns:
hostName: frontend.test
backends:
- virtualService:
virtualServiceName: backend.test
---
apiVersion: appmesh.k8s.aws/v1alpha1
kind: VirtualService
metadata:
name: frontend.test
namespace: test
spec:
meshName: global.appmesh-system
virtualRouter:
name: frontend-router
routes:
- name: frontend-route
http:
match:
prefix: /
action:
weightedTargets:
- virtualNodeName: frontend
weight: 100 |
Thanks, just been looking at the Istio docs, did not realize you could have multiple destinations ports for a data plane. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A Kubernetes service can expose more than one port. To support such a service the TrafficSplit could have an optional field in the backend spec:
ClusterIP with multiple ports:
TrafficSplit for HTTP:
The text was updated successfully, but these errors were encountered: