envoyconfig

package
v0.0.0-...-1f62bb7 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 26 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	StartProxyPort  = 61001
	EndProxyPort    = 65534
	DefaultHTTPPort = 8080
	C2CTLSPort      = 61443
	AdsClusterName  = "pilot-ads"
)

Variables

View Source
var (
	ErrNoPortsAvailable   = errors.New("no ports available")
	SupportedCipherSuites = []string{"ECDHE-RSA-AES256-GCM-SHA384", "ECDHE-RSA-AES128-GCM-SHA256"}
	AlpnProtocols         = []string{"h2,http/1.1"}
)

Functions

func AssignProxyPorts

func AssignProxyPorts(appPorts []executor.PortMapping) ([]executor.PortMapping, error)

AssignProxyPorts takes PortMappings with only ContainerPort set and returns enriched entries with ContainerTLSProxyPort allocated. Port 8080 also gets a C2C TLS mapping on 61443. HostPort and HostTLSProxyPort are left at 0.

func GenerateBootstrap

func GenerateBootstrap(
	container executor.Container,
	adminPort uint16,
	requireClientCerts bool,
	adsServers []string,
	http2Enabled bool,
) ([]byte, error)

GenerateBootstrap returns envoy bootstrap YAML for the given container and options.

func GenerateSDSCAResource

func GenerateSDSCAResource(container executor.Container, idCred Credential, trustedCACerts, verifySubjectAltName []string) ([]byte, error)

GenerateSDSCAResource returns SDS discovery response YAML for the validation context (trusted CA + SAN matchers).

func GenerateSDSCertAndKey

func GenerateSDSCertAndKey(name string, cred Credential) ([]byte, error)

GenerateSDSCertAndKey returns SDS discovery response YAML for a cert/key secret.

func GetAvailablePort

func GetAvailablePort(allocatedPorts []executor.PortMapping, extraKnownPorts ...uint16) (uint16, error)

GetAvailablePort returns a port not in allocatedPorts or extraKnownPorts.

Types

type Credential

type Credential struct {
	Cert string
	Key  string
}

Credential holds cert and key PEM strings for SDS.

func (Credential) IsEmpty

func (c Credential) IsEmpty() bool

Jump to

Keyboard shortcuts

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