类 VirtualServiceOuterClass.HTTPRouteDestination

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
istio.networking.v1alpha3.VirtualServiceOuterClass.HTTPRouteDestination
所有已实现的接口:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder, Serializable
封闭类:
VirtualServiceOuterClass

public static final class VirtualServiceOuterClass.HTTPRouteDestination extends com.google.protobuf.GeneratedMessageV3 implements VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder
 Each routing rule is associated with one or more service versions (see
 glossary in beginning of document). Weights associated with the version
 determine the proportion of traffic it receives. For example, the
 following rule will route 25% of traffic for the "reviews" service to
 instances with the "v2" tag and the remaining traffic (i.e., 75%) to
 "v1".

 {{<tabset category-name="example">}}
 {{<tab name="v1alpha3" category-value="v1alpha3">}}
 ```yaml
 apiVersion: networking.istio.io/v1alpha3
 kind: VirtualService
 metadata:
   name: reviews-route
 spec:
   hosts:
   - reviews.prod.svc.cluster.local
   http:
   - route:
     - destination:
         host: reviews.prod.svc.cluster.local
         subset: v2
       weight: 25
     - destination:
         host: reviews.prod.svc.cluster.local
         subset: v1
       weight: 75
 ```
 {{</tab>}}

 {{<tab name="v1beta1" category-value="v1beta1">}}
 ```yaml
 apiVersion: networking.istio.io/v1beta1
 kind: VirtualService
 metadata:
   name: reviews-route
 spec:
   hosts:
   - reviews.prod.svc.cluster.local
   http:
   - route:
     - destination:
         host: reviews.prod.svc.cluster.local
         subset: v2
       weight: 25
     - destination:
         host: reviews.prod.svc.cluster.local
         subset: v1
       weight: 75
 ```
 {{</tab>}}
 {{</tabset>}}

 And the associated DestinationRule

 {{<tabset category-name="example">}}
 {{<tab name="v1alpha3" category-value="v1alpha3">}}
 ```yaml
 apiVersion: networking.istio.io/v1alpha3
 kind: DestinationRule
 metadata:
   name: reviews-destination
 spec:
   host: reviews.prod.svc.cluster.local
   subsets:
   - name: v1
     labels:
       version: v1
   - name: v2
     labels:
       version: v2
 ```
 {{</tab>}}

 {{<tab name="v1beta1" category-value="v1beta1">}}
 ```yaml
 apiVersion: networking.istio.io/v1beta1
 kind: DestinationRule
 metadata:
   name: reviews-destination
 spec:
   host: reviews.prod.svc.cluster.local
   subsets:
   - name: v1
     labels:
       version: v1
   - name: v2
     labels:
       version: v2
 ```
 {{</tab>}}
 {{</tabset>}}

 Traffic can also be split across two entirely different services without
 having to define new subsets. For example, the following rule forwards 25% of
 traffic to reviews.com to dev.reviews.com

 {{<tabset category-name="example">}}
 {{<tab name="v1alpha3" category-value="v1alpha3">}}
 ```yaml
 apiVersion: networking.istio.io/v1alpha3
 kind: VirtualService
 metadata:
   name: reviews-route-two-domains
 spec:
   hosts:
   - reviews.com
   http:
   - route:
     - destination:
         host: dev.reviews.com
       weight: 25
     - destination:
         host: reviews.com
       weight: 75
 ```
 {{</tab>}}

 {{<tab name="v1beta1" category-value="v1beta1">}}
 ```yaml
 apiVersion: networking.istio.io/v1beta1
 kind: VirtualService
 metadata:
   name: reviews-route-two-domains
 spec:
   hosts:
   - reviews.com
   http:
   - route:
     - destination:
         host: dev.reviews.com
       weight: 25
     - destination:
         host: reviews.com
       weight: 75
 ```
 {{</tab>}}
 {{</tabset>}}

 
Protobuf type istio.networking.v1alpha3.HTTPRouteDestination
另请参阅: