utils

package
v0.18.42 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataPluginName = "envoy.grpc_credentials.file_based_metadata"
)

Variables

View Source
var (
	TlsVersionNotFoundError = func(v v1.SslParameters_ProtocolVersion) error {
		return errors.Errorf("tls version %v not found", v)
	}

	SslSecretNotFoundError = func(err error) error {
		return errors.Wrapf(err, "SSL secret not found")
	}

	NotTlsSecretError = func(ref core.ResourceRef) error {
		return errors.Errorf("%v is not a TLS secret", ref)
	}

	NoCertificateFoundError = errors.New("no certificate information found")
)
View Source
var (
	InvalidRouteActionError = errors.New("cannot use this plugin on non-Route_Route route actions")
)

Functions

func EnsureRouteAction added in v0.18.22

func EnsureRouteAction(out *envoyroute.Route) error

func NewSslConfigTranslator

func NewSslConfigTranslator() *sslConfigTranslator

func PathAsString

func PathAsString(matcher *v1.Matcher) string

func SanitizeForEnvoy added in v0.14.0

func SanitizeForEnvoy(ctx context.Context, resourceName, resourceTypeName string) string

func SortGatewayRoutesByPath added in v0.18.32

func SortGatewayRoutesByPath(routes []*gatewayv1.Route)

func SortRoutesByPath

func SortRoutesByPath(routes []*v1.Route)

opinionated method to sort routes by convention routes are sorted in the following way: 1. exact path < regex path < path prefix 2. longer path string < shorter path string

Types

type CertSource

type CertSource interface {
	GetSecretRef() *core.ResourceRef
	GetSslFiles() *v1.SSLFiles
	GetSds() *v1.SDSConfig
	GetVerifySubjectAltName() []string
	GetParameters() *v1.SslParameters
}

type SslConfigTranslator

type SslConfigTranslator interface {
	ResolveUpstreamSslConfig(secrets v1.SecretList, uc *v1.UpstreamSslConfig) (*envoyauth.UpstreamTlsContext, error)
	ResolveDownstreamSslConfig(secrets v1.SecretList, dc *v1.SslConfig) (*envoyauth.DownstreamTlsContext, error)
	ResolveCommonSslConfig(cs CertSource, secrets v1.SecretList) (*envoyauth.CommonTlsContext, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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