tom055 opened a new issue, #15583:
URL: https://github.com/apache/dubbo/issues/15583

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo:3.3.2 
   JDK: 21
   k8s: 1.23.6
   
   ### Steps to reproduce this issue
   
   dubbo3 registered to k8s, set the weights of v1 and v2 provider, but the 
consumer call provider has no effect
   
   ### What you expected to happen
   
   Both dubbo consumer and provider have been registered in k8s, VirtualService 
and DestinationRule have been added to the provider for weighting, the yaml of 
the provider in k8s is as follows,
   provider yaml
   
   ```
   apiVersion: networking.istio.io/v1alpha3
   kind: DestinationRule
   metadata:
     name: k8s-provider-rule
   spec:
     host: k8s-provider-svc
     trafficPolicy:
       loadBalancer:
         simple: ROUND_ROBIN
     subsets:
       - name: v1
         labels:
           version: v1
       - name: v2
         labels:
           version: v2
   ---
   apiVersion: networking.istio.io/v1alpha3
   kind: VirtualService
   metadata:
     name: k8s-provider-vs
     namespace: dubbo-app
   spec:
     hosts:
       - k8s-provider-svc
     tcp:
       - route:
           - destination:
               host: k8s-provider-svc
               subset: v1
             weight: 9999
           - destination:
               host: k8s-provider-svc
               subset: v2
             weight: 1
   ```
   
   
   consumer yaml
   ```
   apiVersion: v1
   kind: Service
   metadata:
     name: k8s-consumer-svc
     namespace: dubbo-app
   spec:
     type: ClusterIP
     sessionAffinity: None
     selector:
       app: k8s-consumer
     ports:
       - protocol: TCP
         port: 8811
         targetPort: 8811
         name: tcp
       - name: grpc-tri
         protocol: TCP
         port: 50052
         targetPort: 50052
   ```
   the consumer code
   
   ···
   @DubboReference(version = "1.0.0",
               retries = 0,
               providedBy = "k8s-provider-svc",
               timeout=5000,
               providerPort = 50052,
               check = false,
               cluster="failsafe",
               protocol = "tri",mock = 
"org.example.k8s.api.service.mock.ApiOrderMock")
       ApiOrder apiOrder;
   ···
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to