DestinationRule

Destination address rule

DestinationRule

DestinationRule is used to process the rules of the target address, and ServiceEntry, WorkloadEntry and other definitions related to DestinationRule are consistent with open source

  • Example of use
apiVersion: service.dubbo.apache.org/v1alpha1
kind: DestinationRule
metadata:
  name: demo-route
spec:
  host: demo
  subsets:
  trafficPolicy:
  • property description
FieldTypeDescriptionRequired
namestringThe name of the rule, easy to identify the purpose of the ruleYES
hoststringThe corresponding key value in the registry, now it is the interface nameYES
trafficPolicyTrafficPolicytraffic policyNO
subsetsSubset[]naming of single or multiple versions of the serviceYES

Subset

The name of the Subset application service, which can be single or multiple versions

  • Example of use
apiVersion: service.dubbo.apache.org/v1alpha1
kind: DestinationRule
metadata:
  name: demo-route
spec:
  subsets: #Subnet[]
  - name:
    labels:
  • property description
FieldTypeDescriptionRequired
namestringservice version nameYES
labelsmap<string, string>labels on the serviceYES

TrafficPolicy

TrafficPolicy represents the load balancing policy

  • Example of use
apiVersion: service.dubbo.apache.org/v1alpha1
kind: DestinationRule
metadata:
  name: demo-route
spec:
  trafficPolicy: #TrafficPolicy
    loadBalancer:
  • property description
FieldTypeDescriptionRequired
loadBalancerLoadBalancerSettingsLoad Balancer SettingsYES

LoadBalancerSettings

LoadBalancerSettings is used to represent the configuration related to load balancing

  • Example of use
apiVersion: service.dubbo.apache.org/v1alpha1
kind: DestinationRule
metadata:
  name: demo-route
spec:
  trafficPolicy:
    loadBalancer: #LoadBalancerSettings
      simple:
      consistentHash:
  • property description
FieldTypeDescriptionRequired
simplestringload balancing strategy, including: ROUND_ROBIN, LEAST_CONN, RANDOM, PASSTHROUGHYES
consistentHashConsistentHashLBConsistent Hash strategy (not implemented) NO
NO

Last modified January 2, 2023: Enhance en docs (#1798) (95a9f4f6c)