Class GRPCBackendRef

  • All Implemented Interfaces:
    io.fabric8.kubernetes.api.builder.Editable<GRPCBackendRefBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource, Serializable

    @Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator")
    public class GRPCBackendRef
    extends Object
    implements io.fabric8.kubernetes.api.builder.Editable<GRPCBackendRefBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
    GRPCBackendRef defines how a GRPCRoute forwards a gRPC request.


    Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.


    <gateway:experimental:description>


    When the BackendRef points to a Kubernetes Service, implementations SHOULD honor the appProtocol field if it is set for the target Service Port.


    Implementations supporting appProtocol SHOULD recognize the Kubernetes Standard Application Protocols defined in KEP-3726.


    If a Service appProtocol isn't specified, an implementation MAY infer the backend protocol through its own means. Implementations MAY infer the protocol from the Route type referring to the backend Service.


    If a Route is not able to send traffic to the backend using the specified protocol then the backend is considered invalid. Implementations MUST set the "ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.


    </gateway:experimental:description>

    See Also:
    Serialized Form
    • Method Detail

      • getFilters

        public List<GRPCRouteFilter> getFilters()
        Filters defined at this level MUST be executed if and only if the request is being forwarded to the backend defined here.


        Support: Implementation-specific (For broader support of filters, use the Filters field in GRPCRouteRule.)

      • setFilters

        public void setFilters​(List<GRPCRouteFilter> filters)
        Filters defined at this level MUST be executed if and only if the request is being forwarded to the backend defined here.


        Support: Implementation-specific (For broader support of filters, use the Filters field in GRPCRouteRule.)

      • getGroup

        public String getGroup()
        Group is the group of the referent. For example, "gateway.networking.k8s.io". When unspecified or empty string, core API group is inferred.
      • setGroup

        public void setGroup​(String group)
        Group is the group of the referent. For example, "gateway.networking.k8s.io". When unspecified or empty string, core API group is inferred.
      • getKind

        public String getKind()
        Kind is the Kubernetes resource kind of the referent. For example "Service".


        Defaults to "Service" when not specified.


        ExternalName services can refer to CNAME DNS records that may live outside of the cluster and as such are difficult to reason about in terms of conformance. They also may not be safe to forward to (see CVE-2021-25740 for more information). Implementations SHOULD NOT support ExternalName Services.


        Support: Core (Services with a type other than ExternalName)


        Support: Implementation-specific (Services with type ExternalName)

      • setKind

        public void setKind​(String kind)
        Kind is the Kubernetes resource kind of the referent. For example "Service".


        Defaults to "Service" when not specified.


        ExternalName services can refer to CNAME DNS records that may live outside of the cluster and as such are difficult to reason about in terms of conformance. They also may not be safe to forward to (see CVE-2021-25740 for more information). Implementations SHOULD NOT support ExternalName Services.


        Support: Core (Services with a type other than ExternalName)


        Support: Implementation-specific (Services with type ExternalName)

      • getName

        public String getName()
        Name is the name of the referent.
      • setName

        public void setName​(String name)
        Name is the name of the referent.
      • getNamespace

        public String getNamespace()
        Namespace is the namespace of the backend. When unspecified, the local namespace is inferred.


        Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.


        Support: Core

      • setNamespace

        public void setNamespace​(String namespace)
        Namespace is the namespace of the backend. When unspecified, the local namespace is inferred.


        Note that when a namespace different than the local namespace is specified, a ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.


        Support: Core

      • getPort

        public Integer getPort()
        Port specifies the destination port number to use for this resource. Port is required when the referent is a Kubernetes Service. In this case, the port number is the service port number, not the target port. For other resources, destination port might be derived from the referent resource or this field.
      • setPort

        public void setPort​(Integer port)
        Port specifies the destination port number to use for this resource. Port is required when the referent is a Kubernetes Service. In this case, the port number is the service port number, not the target port. For other resources, destination port might be derived from the referent resource or this field.
      • getWeight

        public Integer getWeight()
        Weight specifies the proportion of requests forwarded to the referenced backend. This is computed as weight/(sum of all weights in this BackendRefs list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. Weight is not a percentage and the sum of weights does not need to equal 100.


        If only one backend is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weight is set to 0, no traffic should be forwarded for this entry. If unspecified, weight defaults to 1.


        Support for this field varies based on the context where used.

      • setWeight

        public void setWeight​(Integer weight)
        Weight specifies the proportion of requests forwarded to the referenced backend. This is computed as weight/(sum of all weights in this BackendRefs list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. Weight is not a percentage and the sum of weights does not need to equal 100.


        If only one backend is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weight is set to 0, no traffic should be forwarded for this entry. If unspecified, weight defaults to 1.


        Support for this field varies based on the context where used.

      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)