Documentation
¶
Index ¶
- Variables
- type OverrideHost
- func (*OverrideHost) Descriptor() ([]byte, []int)deprecated
- func (x *OverrideHost) GetFallbackPolicy() *v3.LoadBalancingPolicy
- func (x *OverrideHost) GetOverrideHostSources() []*OverrideHost_OverrideHostSource
- func (*OverrideHost) ProtoMessage()
- func (x *OverrideHost) ProtoReflect() protoreflect.Message
- func (x *OverrideHost) Reset()
- func (x *OverrideHost) String() string
- func (m *OverrideHost) Validate() error
- func (m *OverrideHost) ValidateAll() error
- type OverrideHostMultiError
- type OverrideHostValidationError
- func (e OverrideHostValidationError) Cause() error
- func (e OverrideHostValidationError) Error() string
- func (e OverrideHostValidationError) ErrorName() string
- func (e OverrideHostValidationError) Field() string
- func (e OverrideHostValidationError) Key() bool
- func (e OverrideHostValidationError) Reason() string
- type OverrideHost_OverrideHostSource
- func (*OverrideHost_OverrideHostSource) Descriptor() ([]byte, []int)deprecated
- func (x *OverrideHost_OverrideHostSource) GetHeader() string
- func (x *OverrideHost_OverrideHostSource) GetMetadata() *v31.MetadataKey
- func (*OverrideHost_OverrideHostSource) ProtoMessage()
- func (x *OverrideHost_OverrideHostSource) ProtoReflect() protoreflect.Message
- func (x *OverrideHost_OverrideHostSource) Reset()
- func (x *OverrideHost_OverrideHostSource) String() string
- func (m *OverrideHost_OverrideHostSource) Validate() error
- func (m *OverrideHost_OverrideHostSource) ValidateAll() error
- type OverrideHost_OverrideHostSourceMultiError
- type OverrideHost_OverrideHostSourceValidationError
- func (e OverrideHost_OverrideHostSourceValidationError) Cause() error
- func (e OverrideHost_OverrideHostSourceValidationError) Error() string
- func (e OverrideHost_OverrideHostSourceValidationError) ErrorName() string
- func (e OverrideHost_OverrideHostSourceValidationError) Field() string
- func (e OverrideHost_OverrideHostSourceValidationError) Key() bool
- func (e OverrideHost_OverrideHostSourceValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type OverrideHost ¶
type OverrideHost struct {
// A list of sources to get host addresses from. The host sources are searched in the order
// specified. The request is forwarded to the first address and subsequent addresses are used
// for request retries or hedging.
// Note that if an overridden host address is not present in the current endpoint set, it is
// skipped and the next found address is used. If there are not enough overridden addresses to
// satisfy all retry attempts the fallback load balancing policy is used to pick a host.
OverrideHostSources []*OverrideHost_OverrideHostSource `protobuf:"bytes,1,rep,name=override_host_sources,json=overrideHostSources,proto3" json:"override_host_sources,omitempty"`
// The child LB policy to use in case neither header nor metadata with selected
// hosts is present.
FallbackPolicy *v3.LoadBalancingPolicy `protobuf:"bytes,3,opt,name=fallback_policy,json=fallbackPolicy,proto3" json:"fallback_policy,omitempty"`
// contains filtered or unexported fields
}
Configuration for the Override Host Load Balancing policy.
This policy allows endpoint picking to be implemented in downstream HTTP filters. For example an ext_proc RPC to a service that implements k8s proposal for AI gateway inferences extensions https://github.com/kubernetes-sigs/gateway-api-inference-extension/tree/main/docs/proposals/004-endpoint-picker-protocol can provide hosts for serving a request using Override Host load balancing policy.
This policy extracts selected override hosts from a list of “OverrideHostSource“ (request headers, metadata, etc.).
The override host source must specify at least one host in “IP:Port“ format or multiple hosts in “IP:Port,IP:Port,...“ format. For example “10.0.0.5:8080“ or “[2600:4040:5204::1574:24ae]:80“. The IPv6 address is enclosed in square brackets.
For specific example, to support k8s gateway inference extensions, which uses the “x-gateway-destination-endpoint“ header or metadata value under the "envoy.lb" key for selected hosts, the Override Host load balancing policy should be configured in the following way:
.. code-block:: yaml
override_host_sources:
- header: "x-gateway-destination-endpoint"
- metadata:
key: "envoy.lb"
path:
- key: "x-gateway-destination-endpoint"
If no valid host in the override host list, then the specified fallback load balancing policy is used. This allows load balancing to degrade to a a built in policy (i.e. Round Robin) in case external endpoint picker fails.
See the :ref:`load balancing architecture overview<arch_overview_load_balancing_types>` for more information.
func (*OverrideHost) Descriptor
deprecated
func (*OverrideHost) Descriptor() ([]byte, []int)
Deprecated: Use OverrideHost.ProtoReflect.Descriptor instead.
func (*OverrideHost) GetFallbackPolicy ¶
func (x *OverrideHost) GetFallbackPolicy() *v3.LoadBalancingPolicy
func (*OverrideHost) GetOverrideHostSources ¶
func (x *OverrideHost) GetOverrideHostSources() []*OverrideHost_OverrideHostSource
func (*OverrideHost) ProtoMessage ¶
func (*OverrideHost) ProtoMessage()
func (*OverrideHost) ProtoReflect ¶
func (x *OverrideHost) ProtoReflect() protoreflect.Message
func (*OverrideHost) Reset ¶
func (x *OverrideHost) Reset()
func (*OverrideHost) String ¶
func (x *OverrideHost) String() string
func (*OverrideHost) Validate ¶
func (m *OverrideHost) Validate() error
Validate checks the field values on OverrideHost with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*OverrideHost) ValidateAll ¶
func (m *OverrideHost) ValidateAll() error
ValidateAll checks the field values on OverrideHost with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OverrideHostMultiError, or nil if none found.
type OverrideHostMultiError ¶
type OverrideHostMultiError []error
OverrideHostMultiError is an error wrapping multiple validation errors returned by OverrideHost.ValidateAll() if the designated constraints aren't met.
func (OverrideHostMultiError) AllErrors ¶
func (m OverrideHostMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OverrideHostMultiError) Error ¶
func (m OverrideHostMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OverrideHostValidationError ¶
type OverrideHostValidationError struct {
// contains filtered or unexported fields
}
OverrideHostValidationError is the validation error returned by OverrideHost.Validate if the designated constraints aren't met.
func (OverrideHostValidationError) Cause ¶
func (e OverrideHostValidationError) Cause() error
Cause function returns cause value.
func (OverrideHostValidationError) Error ¶
func (e OverrideHostValidationError) Error() string
Error satisfies the builtin error interface
func (OverrideHostValidationError) ErrorName ¶
func (e OverrideHostValidationError) ErrorName() string
ErrorName returns error name.
func (OverrideHostValidationError) Field ¶
func (e OverrideHostValidationError) Field() string
Field function returns field value.
func (OverrideHostValidationError) Key ¶
func (e OverrideHostValidationError) Key() bool
Key function returns key value.
func (OverrideHostValidationError) Reason ¶
func (e OverrideHostValidationError) Reason() string
Reason function returns reason value.
type OverrideHost_OverrideHostSource ¶
type OverrideHost_OverrideHostSource struct {
// The header to get the override host addresses.
//
// Only one of the header or metadata field could be set.
Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// The metadata key to get the override host addresses from the request dynamic metadata. If
// set this field then it will take precedence over the header field.
//
// Only one of the header or metadata field could be set.
Metadata *v31.MetadataKey `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
// contains filtered or unexported fields
}
func (*OverrideHost_OverrideHostSource) Descriptor
deprecated
func (*OverrideHost_OverrideHostSource) Descriptor() ([]byte, []int)
Deprecated: Use OverrideHost_OverrideHostSource.ProtoReflect.Descriptor instead.
func (*OverrideHost_OverrideHostSource) GetHeader ¶
func (x *OverrideHost_OverrideHostSource) GetHeader() string
func (*OverrideHost_OverrideHostSource) GetMetadata ¶
func (x *OverrideHost_OverrideHostSource) GetMetadata() *v31.MetadataKey
func (*OverrideHost_OverrideHostSource) ProtoMessage ¶
func (*OverrideHost_OverrideHostSource) ProtoMessage()
func (*OverrideHost_OverrideHostSource) ProtoReflect ¶
func (x *OverrideHost_OverrideHostSource) ProtoReflect() protoreflect.Message
func (*OverrideHost_OverrideHostSource) Reset ¶
func (x *OverrideHost_OverrideHostSource) Reset()
func (*OverrideHost_OverrideHostSource) String ¶
func (x *OverrideHost_OverrideHostSource) String() string
func (*OverrideHost_OverrideHostSource) Validate ¶
func (m *OverrideHost_OverrideHostSource) Validate() error
Validate checks the field values on OverrideHost_OverrideHostSource with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*OverrideHost_OverrideHostSource) ValidateAll ¶
func (m *OverrideHost_OverrideHostSource) ValidateAll() error
ValidateAll checks the field values on OverrideHost_OverrideHostSource with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OverrideHost_OverrideHostSourceMultiError, or nil if none found.
type OverrideHost_OverrideHostSourceMultiError ¶
type OverrideHost_OverrideHostSourceMultiError []error
OverrideHost_OverrideHostSourceMultiError is an error wrapping multiple validation errors returned by OverrideHost_OverrideHostSource.ValidateAll() if the designated constraints aren't met.
func (OverrideHost_OverrideHostSourceMultiError) AllErrors ¶
func (m OverrideHost_OverrideHostSourceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OverrideHost_OverrideHostSourceMultiError) Error ¶
func (m OverrideHost_OverrideHostSourceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OverrideHost_OverrideHostSourceValidationError ¶
type OverrideHost_OverrideHostSourceValidationError struct {
// contains filtered or unexported fields
}
OverrideHost_OverrideHostSourceValidationError is the validation error returned by OverrideHost_OverrideHostSource.Validate if the designated constraints aren't met.
func (OverrideHost_OverrideHostSourceValidationError) Cause ¶
func (e OverrideHost_OverrideHostSourceValidationError) Cause() error
Cause function returns cause value.
func (OverrideHost_OverrideHostSourceValidationError) Error ¶
func (e OverrideHost_OverrideHostSourceValidationError) Error() string
Error satisfies the builtin error interface
func (OverrideHost_OverrideHostSourceValidationError) ErrorName ¶
func (e OverrideHost_OverrideHostSourceValidationError) ErrorName() string
ErrorName returns error name.
func (OverrideHost_OverrideHostSourceValidationError) Field ¶
func (e OverrideHost_OverrideHostSourceValidationError) Field() string
Field function returns field value.
func (OverrideHost_OverrideHostSourceValidationError) Key ¶
func (e OverrideHost_OverrideHostSourceValidationError) Key() bool
Key function returns key value.
func (OverrideHost_OverrideHostSourceValidationError) Reason ¶
func (e OverrideHost_OverrideHostSourceValidationError) Reason() string
Reason function returns reason value.