类 DestinationRuleOuterClass.Subset

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

public static final class DestinationRuleOuterClass.Subset extends com.google.protobuf.GeneratedMessageV3 implements DestinationRuleOuterClass.SubsetOrBuilder
 A subset of endpoints of a service. Subsets can be used for scenarios
 like A/B testing, or routing to a specific version of a service. Refer
 to [VirtualService](https://istio.io/docs/reference/config/networking/virtual-service/#VirtualService) documentation for examples of using
 subsets in these scenarios. In addition, traffic policies defined at the
 service-level can be overridden at a subset-level. The following rule
 uses a round robin load balancing policy for all traffic going to a
 subset named testversion that is composed of endpoints (e.g., pods) with
 labels (version:v3).

 {{<tabset category-name="example">}}
 {{<tab name="v1alpha3" category-value="v1alpha3">}}
 ```yaml
 apiVersion: networking.istio.io/v1alpha3
 kind: DestinationRule
 metadata:
   name: bookinfo-ratings
 spec:
   host: ratings.prod.svc.cluster.local
   trafficPolicy:
     loadBalancer:
       simple: LEAST_CONN
   subsets:
   - name: testversion
     labels:
       version: v3
     trafficPolicy:
       loadBalancer:
         simple: ROUND_ROBIN
 ```
 {{</tab>}}

 {{<tab name="v1beta1" category-value="v1beta1">}}
 ```yaml
 apiVersion: networking.istio.io/v1beta1
 kind: DestinationRule
 metadata:
   name: bookinfo-ratings
 spec:
   host: ratings.prod.svc.cluster.local
   trafficPolicy:
     loadBalancer:
       simple: LEAST_CONN
   subsets:
   - name: testversion
     labels:
       version: v3
     trafficPolicy:
       loadBalancer:
         simple: ROUND_ROBIN
 ```
 {{</tab>}}
 {{</tabset>}}

 **Note:** Policies specified for subsets will not take effect until
 a route rule explicitly sends traffic to this subset.

 One or more labels are typically required to identify the subset destination,
 however, when the corresponding DestinationRule represents a host that
 supports multiple SNI hosts (e.g., an egress gateway), a subset without labels
 may be meaningful. In this case a traffic policy with [ClientTLSSettings](#ClientTLSSettings)
 can be used to identify a specific SNI host corresponding to the named subset.
 
Protobuf type istio.networking.v1alpha3.Subset
另请参阅:
  • 字段详细资料

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      另请参阅:
    • LABELS_FIELD_NUMBER

      public static final int LABELS_FIELD_NUMBER
      另请参阅:
    • TRAFFIC_POLICY_FIELD_NUMBER

      public static final int TRAFFIC_POLICY_FIELD_NUMBER
      另请参阅:
  • 方法详细资料

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      覆盖:
      newInstance 在类中 com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      覆盖:
      internalGetMapFieldReflection 在类中 com.google.protobuf.GeneratedMessageV3
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      指定者:
      internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3
    • getName

      public String getName()
       Name of the subset. The service name and the subset name can
       be used for traffic splitting in a route rule.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      指定者:
      getName 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
      返回:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Name of the subset. The service name and the subset name can
       be used for traffic splitting in a route rule.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      指定者:
      getNameBytes 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
      返回:
      The bytes for name.
    • getLabelsCount

      public int getLabelsCount()
       Labels apply a filter over the endpoints of a service in the
       service registry. See route rules for examples of usage.
       
      map<string, string> labels = 2;
      指定者:
      getLabelsCount 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels apply a filter over the endpoints of a service in the
       service registry. See route rules for examples of usage.
       
      map<string, string> labels = 2;
      指定者:
      containsLabels 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      已过时。
      Use getLabelsMap() instead.
      指定者:
      getLabels 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels apply a filter over the endpoints of a service in the
       service registry. See route rules for examples of usage.
       
      map<string, string> labels = 2;
      指定者:
      getLabelsMap 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels apply a filter over the endpoints of a service in the
       service registry. See route rules for examples of usage.
       
      map<string, string> labels = 2;
      指定者:
      getLabelsOrDefault 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels apply a filter over the endpoints of a service in the
       service registry. See route rules for examples of usage.
       
      map<string, string> labels = 2;
      指定者:
      getLabelsOrThrow 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
    • hasTrafficPolicy

      public boolean hasTrafficPolicy()
       Traffic policies that apply to this subset. Subsets inherit the
       traffic policies specified at the DestinationRule level. Settings
       specified at the subset level will override the corresponding settings
       specified at the DestinationRule level.
       
      .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
      指定者:
      hasTrafficPolicy 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
      返回:
      Whether the trafficPolicy field is set.
    • getTrafficPolicy

      public DestinationRuleOuterClass.TrafficPolicy getTrafficPolicy()
       Traffic policies that apply to this subset. Subsets inherit the
       traffic policies specified at the DestinationRule level. Settings
       specified at the subset level will override the corresponding settings
       specified at the DestinationRule level.
       
      .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
      指定者:
      getTrafficPolicy 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
      返回:
      The trafficPolicy.
    • getTrafficPolicyOrBuilder

      public DestinationRuleOuterClass.TrafficPolicyOrBuilder getTrafficPolicyOrBuilder()
       Traffic policies that apply to this subset. Subsets inherit the
       traffic policies specified at the DestinationRule level. Settings
       specified at the subset level will override the corresponding settings
       specified at the DestinationRule level.
       
      .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
      指定者:
      getTrafficPolicyOrBuilder 在接口中 DestinationRuleOuterClass.SubsetOrBuilder
    • isInitialized

      public final boolean isInitialized()
      指定者:
      isInitialized 在接口中 com.google.protobuf.MessageLiteOrBuilder
      覆盖:
      isInitialized 在类中 com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      指定者:
      writeTo 在接口中 com.google.protobuf.MessageLite
      覆盖:
      writeTo 在类中 com.google.protobuf.GeneratedMessageV3
      抛出:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      指定者:
      getSerializedSize 在接口中 com.google.protobuf.MessageLite
      覆盖:
      getSerializedSize 在类中 com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      指定者:
      equals 在接口中 com.google.protobuf.Message
      覆盖:
      equals 在类中 com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      指定者:
      hashCode 在接口中 com.google.protobuf.Message
      覆盖:
      hashCode 在类中 com.google.protobuf.AbstractMessage
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      抛出:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      抛出:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      抛出:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      抛出:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      抛出:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      抛出:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(InputStream input) throws IOException
      抛出:
      IOException
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      抛出:
      IOException
    • parseDelimitedFrom

      public static DestinationRuleOuterClass.Subset parseDelimitedFrom(InputStream input) throws IOException
      抛出:
      IOException
    • parseDelimitedFrom

      public static DestinationRuleOuterClass.Subset parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      抛出:
      IOException
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      抛出:
      IOException
    • parseFrom

      public static DestinationRuleOuterClass.Subset parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      抛出:
      IOException
    • newBuilderForType

      public DestinationRuleOuterClass.Subset.Builder newBuilderForType()
      指定者:
      newBuilderForType 在接口中 com.google.protobuf.Message
      指定者:
      newBuilderForType 在接口中 com.google.protobuf.MessageLite
    • newBuilder

      public static DestinationRuleOuterClass.Subset.Builder newBuilder()
    • newBuilder

    • toBuilder

      指定者:
      toBuilder 在接口中 com.google.protobuf.Message
      指定者:
      toBuilder 在接口中 com.google.protobuf.MessageLite
    • newBuilderForType

      protected DestinationRuleOuterClass.Subset.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      指定者:
      newBuilderForType 在类中 com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static DestinationRuleOuterClass.Subset getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<DestinationRuleOuterClass.Subset> parser()
    • getParserForType

      public com.google.protobuf.Parser<DestinationRuleOuterClass.Subset> getParserForType()
      指定者:
      getParserForType 在接口中 com.google.protobuf.Message
      指定者:
      getParserForType 在接口中 com.google.protobuf.MessageLite
      覆盖:
      getParserForType 在类中 com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public DestinationRuleOuterClass.Subset getDefaultInstanceForType()
      指定者:
      getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuilder
      指定者:
      getDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilder