clusters

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterBuilder

type ClusterBuilder struct {
	// contains filtered or unexported fields
}

ClusterBuilder is responsible for generating an Envoy cluster by applying a series of ClusterConfigurers.

func NewClusterBuilder

func NewClusterBuilder(apiVersion envoy.APIVersion) *ClusterBuilder

func (*ClusterBuilder) Build

func (b *ClusterBuilder) Build() (envoy.NamedResource, error)

Build generates an Envoy cluster by applying a series of ClusterConfigurers.

func (*ClusterBuilder) Configure

func (b *ClusterBuilder) Configure(opts ...ClusterBuilderOpt) *ClusterBuilder

Configure configures ClusterBuilder by adding individual ClusterConfigurers.

type ClusterBuilderConfig

type ClusterBuilderConfig struct {
	// A series of ClusterConfigurers to apply to Envoy cluster.
	ConfigurersV3 []v3.ClusterConfigurer
}

ClusterBuilderConfig holds configuration of a ClusterBuilder.

func (*ClusterBuilderConfig) AddV3

func (c *ClusterBuilderConfig) AddV3(configurer v3.ClusterConfigurer)

Add appends a given ClusterConfigurer to the end of the chain.

type ClusterBuilderOpt

type ClusterBuilderOpt interface {
	// ApplyTo adds ClusterConfigurer(s) to the ClusterBuilder.
	ApplyTo(config *ClusterBuilderConfig)
}

ClusterBuilderOpt is a configuration option for ClusterBuilder.

The goal of ClusterBuilderOpt is to facilitate fluent ClusterBuilder API.

func CircuitBreaker

func CircuitBreaker(circuitBreaker *core_mesh.CircuitBreakerResource) ClusterBuilderOpt

func ClientSideMTLS

func ClientSideMTLS(tracker core_xds.SecretsTracker, mesh *core_mesh.MeshResource, upstreamService string, upstreamTLSReady bool, tags []envoy.Tags) ClusterBuilderOpt

func ClientSideTLS

func ClientSideTLS(endpoints []core_xds.Endpoint) ClusterBuilderOpt

func ConnectionBufferLimit added in v1.8.1

func ConnectionBufferLimit(bytes uint32) ClusterBuilderOpt

func CrossMeshClientSideMTLS added in v1.8.1

func CrossMeshClientSideMTLS(tracker core_xds.SecretsTracker, localMesh *core_mesh.MeshResource, upstreamMesh *core_mesh.MeshResource, upstreamService string, upstreamTLSReady bool, tags []envoy.Tags) ClusterBuilderOpt

func DefaultTimeout

func DefaultTimeout() ClusterBuilderOpt

func EdsCluster

func EdsCluster(name string) ClusterBuilderOpt

func HealthCheck

func HealthCheck(protocol core_mesh.Protocol, healthCheck *core_mesh.HealthCheckResource) ClusterBuilderOpt

func Http

func Http() ClusterBuilderOpt

func Http2

func Http2() ClusterBuilderOpt

func Http2FromEdge added in v1.8.1

func Http2FromEdge() ClusterBuilderOpt

func OutlierDetection

func OutlierDetection(circuitBreaker *core_mesh.CircuitBreakerResource) ClusterBuilderOpt

func PassThroughCluster

func PassThroughCluster(name string) ClusterBuilderOpt

func ProvidedEndpointCluster added in v1.8.1

func ProvidedEndpointCluster(name string, hasIPv6 bool, endpoints ...core_xds.Endpoint) ClusterBuilderOpt

ProvidedEndpointCluster sets the cluster with the defined endpoints, this is useful when endpoints are not discovered using EDS, so we don't use EdsCluster

func Timeout

func Timeout(timeout *mesh_proto.Timeout_Conf, protocol core_mesh.Protocol) ClusterBuilderOpt

func UnknownDestinationClientSideMTLS

func UnknownDestinationClientSideMTLS(tracker core_xds.SecretsTracker, mesh *core_mesh.MeshResource) ClusterBuilderOpt

UnknownDestinationClientSideMTLS configures cluster with mTLS for a mesh but without extensive destination verification (only Mesh is verified)

func UpstreamBindConfig

func UpstreamBindConfig(address string, port uint32) ClusterBuilderOpt

type ClusterBuilderOptFunc

type ClusterBuilderOptFunc func(config *ClusterBuilderConfig)

ClusterBuilderOptFunc is a convenience type adapter.

func LbSubset

func LbSubset(tagSets envoy.TagKeysSlice) ClusterBuilderOptFunc

LbSubset is required for MetadataMatch in Weighted Cluster in TCP Proxy to work. Subset loadbalancing is used in two use cases

  1. TrafficRoute for splitting traffic. Example: TrafficRoute that splits 10% of the traffic to version 1 of the service backend and 90% traffic to version 2 of the service backend
  2. Multiple outbound sections with the same service Example: type: Dataplane networking: outbound: - port: 1234 tags: kuma.io/service: backend - port: 1234 tags: kuma.io/service: backend version: v1 Only one cluster "backend" is generated for such dataplane, but with lb subset by version.

func (ClusterBuilderOptFunc) ApplyTo

func (f ClusterBuilderOptFunc) ApplyTo(config *ClusterBuilderConfig)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL