| --- |
| apiVersion: networking.istio.io/v1alpha3 |
| kind: VirtualService |
| metadata: |
| name: dubbo-samples-mesh-provider |
| namespace: dubbo-demo |
| spec: |
| hosts: |
| - dubbo-samples-mesh-provider.dubbo-demo.svc.cluster.local |
| http: |
| - route: |
| - destination: |
| host: dubbo-samples-mesh-provider.dubbo-demo.svc.cluster.local |
| subset: v1 |
| port: |
| # Specifies the port on the host being addressed. If the service exposes only one port, you don't need to choose the port explicitly |
| number: 50052 |
| weight: 80 |
| - destination: |
| host: dubbo-samples-mesh-provider.dubbo-demo.svc.cluster.local |
| subset: v2 |
| port: |
| # Specifies the port on the host being addressed. If the service exposes only one port, you don't need to choose the port explicitly |
| number: 50052 |
| weight: 20 |
| |
| --- |
| apiVersion: networking.istio.io/v1alpha3 |
| kind: DestinationRule |
| metadata: |
| name: dubbo-samples-mesh-provider |
| namespace: dubbo-demo |
| spec: |
| host: dubbo-samples-mesh-provider.dubbo-demo.svc.cluster.local |
| trafficPolicy: |
| loadBalancer: |
| # Envoy load balancing strategy |
| simple: ROUND_ROBIN |
| subsets: |
| - name: v1 |
| labels: |
| version: v1 |
| - name: v2 |
| labels: |
| version: v2 |