Documentation ¶
Index ¶
- Constants
- Variables
- func CheckForDuplicateFilterChainMatches(filterChains []*envoy_config_listener_v3.FilterChain, ...)
- func ClusterToUpstreamRef(cluster string) (*core.ResourceRef, error)
- func DataSourceFromString(str string) *envoy_config_core_v3.DataSource
- func EnvoyCacheResourcesListToFnvHash(resources []envoycache.Resource) uint64
- func EnvoyCacheResourcesListToHash(resources []envoycache.Resource) uint64
- func GlooMatcherToEnvoyMatcher(ctx context.Context, matcher *matchers.Matcher) envoy_config_route_v3.RouteMatch
- func MakeRdsResources(routeConfigs []*envoy_config_route_v3.RouteConfiguration) envoycache.Resources
- func NewAccessLogWithConfig(name string, config proto.Message) (envoyal.AccessLog, error)
- func NewFilterWithTypedConfig(name string, config proto.Message) (*envoy_config_listener_v3.Filter, error)
- func NewHttpConnectionManager(listener *v1.HttpListener, httpFilters []*envoyhttp.HttpFilter, rdsName string) *envoyhttp.HttpConnectionManager
- func ParseTypedConfig(c typedConfigObject, config proto.Message) error
- func UpstreamToClusterName(upstream *core.ResourceRef) string
- func ValidateRouteDestinations(snap *v1.ApiSnapshot, action *v1.RouteAction) error
- func ValidateTcpRouteDestinations(snap *v1.ApiSnapshot, action *v1.TcpHost_TcpAction) error
- func ValidateVirtualHostDomains(virtualHosts []*v1.VirtualHost, ...)
- type Translator
Constants ¶
const (
DefaultHttpStatPrefix = "http"
)
const EnvoyLb = "envoy.lb"
const SoloAnnotations = "io.solo.annotations"
Variables ¶
var ( DefaultHealthCheckTimeout = &duration.Duration{Seconds: 5} DefaultHealthCheckInterval = prototime.DurationToProto(time.Millisecond * 100) DefaultThreshold = &wrappers.UInt32Value{ Value: 5, } NilFieldError = func(fieldName string) error { return eris.Errorf("The field %s cannot be nil", fieldName) } )
var ( NoDestinationSpecifiedError = errors.New("must specify at least one weighted destination for multi destination routes") SubsetsMisconfiguredErr = errors.New("route has a subset config, but the upstream does not.") )
var (
ClusterConnectionTimeout = time.Second * 5
)
Functions ¶
func CheckForDuplicateFilterChainMatches ¶ added in v1.4.13
func CheckForDuplicateFilterChainMatches(filterChains []*envoy_config_listener_v3.FilterChain, listenerReport *validationapi.ListenerReport)
Check for identical FilterChains to avoid the envoy error that occurs here: https://github.com/envoyproxy/envoy/blob/v1.15.0/source/server/filter_chain_manager_impl.cc#L162-L166 Note: this is NOT address non-equal but overlapping FilterChainMatches, which is a separate check here: https://github.com/envoyproxy/envoy/blob/50ef0945fa2c5da4bff7627c3abf41fdd3b7cffd/source/server/filter_chain_manager_impl.cc#L218-L354 Given the complexity of the overlap detection implementation, we don't want to duplicate that behavior here. We may want to consider invoking envoy from a library to detect overlapping and other issues, which would build off this discussion: https://github.com/solo-io/gloo/issues/2114 Visible for testing
func ClusterToUpstreamRef ¶ added in v1.6.10
func ClusterToUpstreamRef(cluster string) (*core.ResourceRef, error)
returns the ref of the upstream for a given cluster
func DataSourceFromString ¶
func DataSourceFromString(str string) *envoy_config_core_v3.DataSource
func EnvoyCacheResourcesListToFnvHash ¶ added in v1.6.3
func EnvoyCacheResourcesListToFnvHash(resources []envoycache.Resource) uint64
func EnvoyCacheResourcesListToHash ¶ added in v1.6.3
func EnvoyCacheResourcesListToHash(resources []envoycache.Resource) uint64
deprecated, slower than EnvoyCacheResourcesListToFnvHash
func GlooMatcherToEnvoyMatcher ¶ added in v1.0.0
func GlooMatcherToEnvoyMatcher(ctx context.Context, matcher *matchers.Matcher) envoy_config_route_v3.RouteMatch
utility function to transform gloo matcher to envoy route matcher
func MakeRdsResources ¶ added in v1.0.0
func MakeRdsResources(routeConfigs []*envoy_config_route_v3.RouteConfiguration) envoycache.Resources
func NewAccessLogWithConfig ¶ added in v0.18.1
func NewFilterWithTypedConfig ¶ added in v1.5.0
func NewHttpConnectionManager ¶
func NewHttpConnectionManager( listener *v1.HttpListener, httpFilters []*envoyhttp.HttpFilter, rdsName string, ) *envoyhttp.HttpConnectionManager
func ParseTypedConfig ¶ added in v1.5.0
func UpstreamToClusterName ¶
func UpstreamToClusterName(upstream *core.ResourceRef) string
returns the name of the cluster created for a given upstream
func ValidateRouteDestinations ¶ added in v0.18.0
func ValidateRouteDestinations(snap *v1.ApiSnapshot, action *v1.RouteAction) error
func ValidateTcpRouteDestinations ¶ added in v1.4.2
func ValidateTcpRouteDestinations(snap *v1.ApiSnapshot, action *v1.TcpHost_TcpAction) error
func ValidateVirtualHostDomains ¶ added in v1.2.5
func ValidateVirtualHostDomains(virtualHosts []*v1.VirtualHost, httpListenerReport *validationapi.HttpListenerReport)
returns an error if any of the virtualhost domains overlap Visible for testing
Types ¶
type Translator ¶
type Translator interface { Translate( params plugins.Params, proxy *v1.Proxy, ) (envoycache.Snapshot, reporter.ResourceReports, *validationapi.ProxyReport, error) }
func NewTranslator ¶
func NewTranslator( sslConfigTranslator utils.SslConfigTranslator, settings *v1.Settings, getPlugins func() []plugins.Plugin, ) Translator
func NewTranslatorWithHasher ¶ added in v1.6.3
func NewTranslatorWithHasher( sslConfigTranslator utils.SslConfigTranslator, settings *v1.Settings, getPlugins func() []plugins.Plugin, hasher func(resources []envoycache.Resource) uint64, ) Translator