类 VirtualServiceOuterClass.Destination.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<VirtualServiceOuterClass.Destination.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>
istio.networking.v1alpha3.VirtualServiceOuterClass.Destination.Builder
所有已实现的接口:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, VirtualServiceOuterClass.DestinationOrBuilder, Cloneable
封闭类:
VirtualServiceOuterClass.Destination

public static final class VirtualServiceOuterClass.Destination.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder> implements VirtualServiceOuterClass.DestinationOrBuilder
 Destination indicates the network addressable service to which the
 request/connection will be sent after processing a routing rule. The
 destination.host should unambiguously refer to a service in the service
 registry. Istio's service registry is composed of all the services found
 in the platform's service registry (e.g., Kubernetes services, Consul
 services), as well as services declared through the
 [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry) resource.

 *Note for Kubernetes users*: When short names are used (e.g. "reviews"
 instead of "reviews.default.svc.cluster.local"), Istio will interpret
 the short name based on the namespace of the rule, not the service. A
 rule in the "default" namespace containing a host "reviews will be
 interpreted as "reviews.default.svc.cluster.local", irrespective of the
 actual namespace associated with the reviews service. _To avoid potential
 misconfigurations, it is recommended to always use fully qualified
 domain names over short names._

 The following Kubernetes example routes all traffic by default to pods
 of the reviews service with label "version: v1" (i.e., subset v1), and
 some to subset v2, in a Kubernetes environment.

 {{<tabset category-name="example">}}
 {{<tab name="v1alpha3" category-value="v1alpha3">}}
 ```yaml
 apiVersion: networking.istio.io/v1alpha3
 kind: VirtualService
 metadata:
   name: reviews-route
   namespace: foo
 spec:
   hosts:
   - reviews # interpreted as reviews.foo.svc.cluster.local
   http:
   - match:
     - uri:
         prefix: "/wpcatalog"
     - uri:
         prefix: "/consumercatalog"
     rewrite:
       uri: "/newcatalog"
     route:
     - destination:
         host: reviews # interpreted as reviews.foo.svc.cluster.local
         subset: v2
   - route:
     - destination:
         host: reviews # interpreted as reviews.foo.svc.cluster.local
         subset: v1
 ```
 {{</tab>}}

 {{<tab name="v1beta1" category-value="v1beta1">}}
 ```yaml
 apiVersion: networking.istio.io/v1beta1
 kind: VirtualService
 metadata:
   name: reviews-route
   namespace: foo
 spec:
   hosts:
   - reviews # interpreted as reviews.foo.svc.cluster.local
   http:
   - match:
     - uri:
         prefix: "/wpcatalog"
     - uri:
         prefix: "/consumercatalog"
     rewrite:
       uri: "/newcatalog"
     route:
     - destination:
         host: reviews # interpreted as reviews.foo.svc.cluster.local
         subset: v2
   - route:
     - destination:
         host: reviews # interpreted as reviews.foo.svc.cluster.local
         subset: v1
 ```
 {{</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
   namespace: foo
 spec:
   host: reviews # interpreted as reviews.foo.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
   namespace: foo
 spec:
   host: reviews # interpreted as reviews.foo.svc.cluster.local
   subsets:
   - name: v1
     labels:
       version: v1
   - name: v2
     labels:
       version: v2
 ```
 {{</tab>}}
 {{</tabset>}}

 The following VirtualService sets a timeout of 5s for all calls to
 productpage.prod.svc.cluster.local service in Kubernetes. Notice that
 there are no subsets defined in this rule. Istio will fetch all
 instances of productpage.prod.svc.cluster.local service from the service
 registry and populate the sidecar's load balancing pool. Also, notice
 that this rule is set in the istio-system namespace but uses the fully
 qualified domain name of the productpage service,
 productpage.prod.svc.cluster.local. Therefore the rule's namespace does
 not have an impact in resolving the name of the productpage service.

 {{<tabset category-name="example">}}
 {{<tab name="v1alpha3" category-value="v1alpha3">}}
 ```yaml
 apiVersion: networking.istio.io/v1alpha3
 kind: VirtualService
 metadata:
   name: my-productpage-rule
   namespace: istio-system
 spec:
   hosts:
   - productpage.prod.svc.cluster.local # ignores rule namespace
   http:
   - timeout: 5s
     route:
     - destination:
         host: productpage.prod.svc.cluster.local
 ```
 {{</tab>}}

 {{<tab name="v1beta1" category-value="v1beta1">}}
 ```yaml
 apiVersion: networking.istio.io/v1beta1
 kind: VirtualService
 metadata:
   name: my-productpage-rule
   namespace: istio-system
 spec:
   hosts:
   - productpage.prod.svc.cluster.local # ignores rule namespace
   http:
   - timeout: 5s
     route:
     - destination:
         host: productpage.prod.svc.cluster.local
 ```
 {{</tab>}}
 {{</tabset>}}

 To control routing for traffic bound to services outside the mesh, external
 services must first be added to Istio's internal service registry using the
 ServiceEntry resource. VirtualServices can then be defined to control traffic
 bound to these external services. For example, the following rules define a
 Service for wikipedia.org and set a timeout of 5s for HTTP requests.

 {{<tabset category-name="example">}}
 {{<tab name="v1alpha3" category-value="v1alpha3">}}
 ```yaml
 apiVersion: networking.istio.io/v1alpha3
 kind: ServiceEntry
 metadata:
   name: external-svc-wikipedia
 spec:
   hosts:
   - wikipedia.org
   location: MESH_EXTERNAL
   ports:
   - number: 80
     name: example-http
     protocol: HTTP
   resolution: DNS

 apiVersion: networking.istio.io/v1alpha3
 kind: VirtualService
 metadata:
   name: my-wiki-rule
 spec:
   hosts:
   - wikipedia.org
   http:
   - timeout: 5s
     route:
     - destination:
         host: wikipedia.org
 ```
 {{</tab>}}

 {{<tab name="v1beta1" category-value="v1beta1">}}
 ```yaml
 apiVersion: networking.istio.io/v1beta1
 kind: ServiceEntry
 metadata:
   name: external-svc-wikipedia
 spec:
   hosts:
   - wikipedia.org
   location: MESH_EXTERNAL
   ports:
   - number: 80
     name: example-http
     protocol: HTTP
   resolution: DNS

 apiVersion: networking.istio.io/v1alpha3
 kind: VirtualService
 metadata:
   name: my-wiki-rule
 spec:
   hosts:
   - wikipedia.org
   http:
   - timeout: 5s
     route:
     - destination:
         host: wikipedia.org
 ```
 {{</tab>}}
 {{</tabset>}}

 
Protobuf type istio.networking.v1alpha3.Destination
  • 方法详细资料

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      指定者:
      internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>
    • clear

      指定者:
      clear 在接口中 com.google.protobuf.Message.Builder
      指定者:
      clear 在接口中 com.google.protobuf.MessageLite.Builder
      覆盖:
      clear 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.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<VirtualServiceOuterClass.Destination.Builder>
    • getDefaultInstanceForType

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

      指定者:
      build 在接口中 com.google.protobuf.Message.Builder
      指定者:
      build 在接口中 com.google.protobuf.MessageLite.Builder
    • buildPartial

      public VirtualServiceOuterClass.Destination buildPartial()
      指定者:
      buildPartial 在接口中 com.google.protobuf.Message.Builder
      指定者:
      buildPartial 在接口中 com.google.protobuf.MessageLite.Builder
    • clone

      指定者:
      clone 在接口中 com.google.protobuf.Message.Builder
      指定者:
      clone 在接口中 com.google.protobuf.MessageLite.Builder
      覆盖:
      clone 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>
    • setField

      public VirtualServiceOuterClass.Destination.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      指定者:
      setField 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      setField 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>
    • clearField

      public VirtualServiceOuterClass.Destination.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      指定者:
      clearField 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      clearField 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>
    • clearOneof

      public VirtualServiceOuterClass.Destination.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      指定者:
      clearOneof 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      clearOneof 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>
    • setRepeatedField

      public VirtualServiceOuterClass.Destination.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      指定者:
      setRepeatedField 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      setRepeatedField 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>
    • addRepeatedField

      public VirtualServiceOuterClass.Destination.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      指定者:
      addRepeatedField 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      addRepeatedField 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>
    • mergeFrom

      public VirtualServiceOuterClass.Destination.Builder mergeFrom(com.google.protobuf.Message other)
      指定者:
      mergeFrom 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      mergeFrom 在类中 com.google.protobuf.AbstractMessage.Builder<VirtualServiceOuterClass.Destination.Builder>
    • mergeFrom

    • isInitialized

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

      public VirtualServiceOuterClass.Destination.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      指定者:
      mergeFrom 在接口中 com.google.protobuf.Message.Builder
      指定者:
      mergeFrom 在接口中 com.google.protobuf.MessageLite.Builder
      覆盖:
      mergeFrom 在类中 com.google.protobuf.AbstractMessage.Builder<VirtualServiceOuterClass.Destination.Builder>
      抛出:
      IOException
    • getHost

      public String getHost()
       The name of a service from the service registry. Service
       names are looked up from the platform's service registry (e.g.,
       Kubernetes services, Consul services, etc.) and from the hosts
       declared by [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Traffic forwarded to
       destinations that are not found in either of the two, will be dropped.
      
       *Note for Kubernetes users*: When short names are used (e.g. "reviews"
       instead of "reviews.default.svc.cluster.local"), Istio will interpret
       the short name based on the namespace of the rule, not the service. A
       rule in the "default" namespace containing a host "reviews will be
       interpreted as "reviews.default.svc.cluster.local", irrespective of
       the actual namespace associated with the reviews service. To avoid
       potential misconfiguration, it is recommended to always use fully
       qualified domain names over short names.
       
      string host = 1 [(.google.api.field_behavior) = REQUIRED];
      指定者:
      getHost 在接口中 VirtualServiceOuterClass.DestinationOrBuilder
      返回:
      The host.
    • getHostBytes

      public com.google.protobuf.ByteString getHostBytes()
       The name of a service from the service registry. Service
       names are looked up from the platform's service registry (e.g.,
       Kubernetes services, Consul services, etc.) and from the hosts
       declared by [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Traffic forwarded to
       destinations that are not found in either of the two, will be dropped.
      
       *Note for Kubernetes users*: When short names are used (e.g. "reviews"
       instead of "reviews.default.svc.cluster.local"), Istio will interpret
       the short name based on the namespace of the rule, not the service. A
       rule in the "default" namespace containing a host "reviews will be
       interpreted as "reviews.default.svc.cluster.local", irrespective of
       the actual namespace associated with the reviews service. To avoid
       potential misconfiguration, it is recommended to always use fully
       qualified domain names over short names.
       
      string host = 1 [(.google.api.field_behavior) = REQUIRED];
      指定者:
      getHostBytes 在接口中 VirtualServiceOuterClass.DestinationOrBuilder
      返回:
      The bytes for host.
    • setHost

       The name of a service from the service registry. Service
       names are looked up from the platform's service registry (e.g.,
       Kubernetes services, Consul services, etc.) and from the hosts
       declared by [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Traffic forwarded to
       destinations that are not found in either of the two, will be dropped.
      
       *Note for Kubernetes users*: When short names are used (e.g. "reviews"
       instead of "reviews.default.svc.cluster.local"), Istio will interpret
       the short name based on the namespace of the rule, not the service. A
       rule in the "default" namespace containing a host "reviews will be
       interpreted as "reviews.default.svc.cluster.local", irrespective of
       the actual namespace associated with the reviews service. To avoid
       potential misconfiguration, it is recommended to always use fully
       qualified domain names over short names.
       
      string host = 1 [(.google.api.field_behavior) = REQUIRED];
      参数:
      value - The host to set.
      返回:
      This builder for chaining.
    • clearHost

       The name of a service from the service registry. Service
       names are looked up from the platform's service registry (e.g.,
       Kubernetes services, Consul services, etc.) and from the hosts
       declared by [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Traffic forwarded to
       destinations that are not found in either of the two, will be dropped.
      
       *Note for Kubernetes users*: When short names are used (e.g. "reviews"
       instead of "reviews.default.svc.cluster.local"), Istio will interpret
       the short name based on the namespace of the rule, not the service. A
       rule in the "default" namespace containing a host "reviews will be
       interpreted as "reviews.default.svc.cluster.local", irrespective of
       the actual namespace associated with the reviews service. To avoid
       potential misconfiguration, it is recommended to always use fully
       qualified domain names over short names.
       
      string host = 1 [(.google.api.field_behavior) = REQUIRED];
      返回:
      This builder for chaining.
    • setHostBytes

      public VirtualServiceOuterClass.Destination.Builder setHostBytes(com.google.protobuf.ByteString value)
       The name of a service from the service registry. Service
       names are looked up from the platform's service registry (e.g.,
       Kubernetes services, Consul services, etc.) and from the hosts
       declared by [ServiceEntry](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Traffic forwarded to
       destinations that are not found in either of the two, will be dropped.
      
       *Note for Kubernetes users*: When short names are used (e.g. "reviews"
       instead of "reviews.default.svc.cluster.local"), Istio will interpret
       the short name based on the namespace of the rule, not the service. A
       rule in the "default" namespace containing a host "reviews will be
       interpreted as "reviews.default.svc.cluster.local", irrespective of
       the actual namespace associated with the reviews service. To avoid
       potential misconfiguration, it is recommended to always use fully
       qualified domain names over short names.
       
      string host = 1 [(.google.api.field_behavior) = REQUIRED];
      参数:
      value - The bytes for host to set.
      返回:
      This builder for chaining.
    • getSubset

      public String getSubset()
       The name of a subset within the service. Applicable only to services
       within the mesh. The subset must be defined in a corresponding
       DestinationRule.
       
      string subset = 2;
      指定者:
      getSubset 在接口中 VirtualServiceOuterClass.DestinationOrBuilder
      返回:
      The subset.
    • getSubsetBytes

      public com.google.protobuf.ByteString getSubsetBytes()
       The name of a subset within the service. Applicable only to services
       within the mesh. The subset must be defined in a corresponding
       DestinationRule.
       
      string subset = 2;
      指定者:
      getSubsetBytes 在接口中 VirtualServiceOuterClass.DestinationOrBuilder
      返回:
      The bytes for subset.
    • setSubset

       The name of a subset within the service. Applicable only to services
       within the mesh. The subset must be defined in a corresponding
       DestinationRule.
       
      string subset = 2;
      参数:
      value - The subset to set.
      返回:
      This builder for chaining.
    • clearSubset

       The name of a subset within the service. Applicable only to services
       within the mesh. The subset must be defined in a corresponding
       DestinationRule.
       
      string subset = 2;
      返回:
      This builder for chaining.
    • setSubsetBytes

      public VirtualServiceOuterClass.Destination.Builder setSubsetBytes(com.google.protobuf.ByteString value)
       The name of a subset within the service. Applicable only to services
       within the mesh. The subset must be defined in a corresponding
       DestinationRule.
       
      string subset = 2;
      参数:
      value - The bytes for subset to set.
      返回:
      This builder for chaining.
    • hasPort

      public boolean hasPort()
       Specifies the port on the host that is being addressed. If a service
       exposes only a single port it is not required to explicitly select the
       port.
       
      .istio.networking.v1alpha3.PortSelector port = 3;
      指定者:
      hasPort 在接口中 VirtualServiceOuterClass.DestinationOrBuilder
      返回:
      Whether the port field is set.
    • getPort

       Specifies the port on the host that is being addressed. If a service
       exposes only a single port it is not required to explicitly select the
       port.
       
      .istio.networking.v1alpha3.PortSelector port = 3;
      指定者:
      getPort 在接口中 VirtualServiceOuterClass.DestinationOrBuilder
      返回:
      The port.
    • setPort

       Specifies the port on the host that is being addressed. If a service
       exposes only a single port it is not required to explicitly select the
       port.
       
      .istio.networking.v1alpha3.PortSelector port = 3;
    • setPort

       Specifies the port on the host that is being addressed. If a service
       exposes only a single port it is not required to explicitly select the
       port.
       
      .istio.networking.v1alpha3.PortSelector port = 3;
    • mergePort

       Specifies the port on the host that is being addressed. If a service
       exposes only a single port it is not required to explicitly select the
       port.
       
      .istio.networking.v1alpha3.PortSelector port = 3;
    • clearPort

       Specifies the port on the host that is being addressed. If a service
       exposes only a single port it is not required to explicitly select the
       port.
       
      .istio.networking.v1alpha3.PortSelector port = 3;
    • getPortBuilder

       Specifies the port on the host that is being addressed. If a service
       exposes only a single port it is not required to explicitly select the
       port.
       
      .istio.networking.v1alpha3.PortSelector port = 3;
    • getPortOrBuilder

       Specifies the port on the host that is being addressed. If a service
       exposes only a single port it is not required to explicitly select the
       port.
       
      .istio.networking.v1alpha3.PortSelector port = 3;
      指定者:
      getPortOrBuilder 在接口中 VirtualServiceOuterClass.DestinationOrBuilder
    • setUnknownFields

      public final VirtualServiceOuterClass.Destination.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      指定者:
      setUnknownFields 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      setUnknownFields 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>
    • mergeUnknownFields

      public final VirtualServiceOuterClass.Destination.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      指定者:
      mergeUnknownFields 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      mergeUnknownFields 在类中 com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.Destination.Builder>