类 DestinationRuleOuterClass.Subset.Builder

  • 所有已实现的接口:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, DestinationRuleOuterClass.SubsetOrBuilder, java.lang.Cloneable
    封闭类:
    DestinationRuleOuterClass.Subset

    public static final class DestinationRuleOuterClass.Subset.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<DestinationRuleOuterClass.Subset.Builder>
    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
    • 构造器详细资料

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
    • 方法详细资料

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        覆盖:
        internalGetMapField 在类中 com.google.protobuf.GeneratedMessageV3.Builder<DestinationRuleOuterClass.Subset.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        覆盖:
        internalGetMutableMapField 在类中 com.google.protobuf.GeneratedMessageV3.Builder<DestinationRuleOuterClass.Subset.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        指定者:
        internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3.Builder<DestinationRuleOuterClass.Subset.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        指定者:
        getDescriptorForType 在接口中 com.google.protobuf.Message.Builder
        指定者:
        getDescriptorForType 在接口中 com.google.protobuf.MessageOrBuilder
        覆盖:
        getDescriptorForType 在类中 com.google.protobuf.GeneratedMessageV3.Builder<DestinationRuleOuterClass.Subset.Builder>
      • getDefaultInstanceForType

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

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

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

        public final boolean isInitialized()
        指定者:
        isInitialized 在接口中 com.google.protobuf.MessageLiteOrBuilder
        覆盖:
        isInitialized 在类中 com.google.protobuf.GeneratedMessageV3.Builder<DestinationRuleOuterClass.Subset.Builder>
      • mergeFrom

        public DestinationRuleOuterClass.Subset.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                           throws java.io.IOException
        指定者:
        mergeFrom 在接口中 com.google.protobuf.Message.Builder
        指定者:
        mergeFrom 在接口中 com.google.protobuf.MessageLite.Builder
        覆盖:
        mergeFrom 在类中 com.google.protobuf.AbstractMessage.Builder<DestinationRuleOuterClass.Subset.Builder>
        抛出:
        java.io.IOException
      • getName

        public java.lang.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.
      • setName

        public DestinationRuleOuterClass.Subset.Builder setName​(java.lang.String value)
         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];
        参数:
        value - The name to set.
        返回:
        This builder for chaining.
      • clearName

        public DestinationRuleOuterClass.Subset.Builder clearName()
         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];
        返回:
        This builder for chaining.
      • setNameBytes

        public DestinationRuleOuterClass.Subset.Builder setNameBytes​(com.google.protobuf.ByteString value)
         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];
        参数:
        value - The bytes for name to set.
        返回:
        This builder for chaining.
      • internalGetLabels

        private com.google.protobuf.MapField<java.lang.String,​java.lang.String> internalGetLabels()
      • internalGetMutableLabels

        private com.google.protobuf.MapField<java.lang.String,​java.lang.String> internalGetMutableLabels()
      • containsLabels

        public boolean containsLabels​(java.lang.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
      • getLabelsMap

        public java.util.Map<java.lang.String,​java.lang.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 java.lang.String getLabelsOrDefault​(java.lang.String key,
                                                   java.lang.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 java.lang.String getLabelsOrThrow​(java.lang.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
      • removeLabels

        public DestinationRuleOuterClass.Subset.Builder removeLabels​(java.lang.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;
      • getMutableLabels

        @Deprecated
        public java.util.Map<java.lang.String,​java.lang.String> getMutableLabels()
        已过时。
        Use alternate mutation accessors instead.
      • putLabels

        public DestinationRuleOuterClass.Subset.Builder putLabels​(java.lang.String key,
                                                                  java.lang.String value)
         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;
      • putAllLabels

        public DestinationRuleOuterClass.Subset.Builder putAllLabels​(java.util.Map<java.lang.String,​java.lang.String> values)
         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;
      • 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.
      • setTrafficPolicy

        public DestinationRuleOuterClass.Subset.Builder setTrafficPolicy​(DestinationRuleOuterClass.TrafficPolicy value)
         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;
      • setTrafficPolicy

        public DestinationRuleOuterClass.Subset.Builder setTrafficPolicy​(DestinationRuleOuterClass.TrafficPolicy.Builder builderForValue)
         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;
      • mergeTrafficPolicy

        public DestinationRuleOuterClass.Subset.Builder mergeTrafficPolicy​(DestinationRuleOuterClass.TrafficPolicy value)
         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;
      • clearTrafficPolicy

        public DestinationRuleOuterClass.Subset.Builder clearTrafficPolicy()
         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;
      • getTrafficPolicyBuilder

        public DestinationRuleOuterClass.TrafficPolicy.Builder getTrafficPolicyBuilder()
         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;