envoyconfig

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 67 Imported by: 1

Documentation

Overview

Package envoyconfig contains a Builder for building Envoy configuration from Pomerium configuration.

Index

Constants

View Source
const PerFilterConfigExtAuthzName = "envoy.filters.http.ext_authz"

PerFilterConfigExtAuthzName is the name of the ext authz filter to apply config to

Variables

This section is empty.

Functions

func ExtAuthzContextExtensionsIsInternal added in v0.17.4

func ExtAuthzContextExtensionsIsInternal(extAuthzContextExtensions map[string]string) bool

ExtAuthzContextExtensionsIsInternal returns true if the context extensions indicates the route is internal.

func ExtAuthzContextExtensionsRouteID added in v0.21.4

func ExtAuthzContextExtensionsRouteID(extAuthzContextExtensions map[string]string) uint64

ExtAuthzContextExtensionsRouteID returns the route id for the context extensions.

func ExtAuthzFilter added in v0.19.0

ExtAuthzFilter creates an ext authz filter.

func HTTPConnectionManagerFilter added in v0.19.0

HTTPConnectionManagerFilter creates a new HTTP connection manager filter.

func HTTPRouterFilter added in v0.19.0

HTTPRouterFilter creates a new HTTP router filter.

func LuaFilter added in v0.19.0

LuaFilter creates a lua HTTP filter.

func MakeExtAuthzContextExtensions added in v0.17.4

func MakeExtAuthzContextExtensions(internal bool, routeID uint64) map[string]string

MakeExtAuthzContextExtensions makes the ext authz context extensions.

func PerFilterConfigExtAuthzContextExtensions added in v0.17.4

func PerFilterConfigExtAuthzContextExtensions(authzContextExtensions map[string]string) *anypb.Any

PerFilterConfigExtAuthzContextExtensions returns a per-filter config for ext authz that disables ext-authz.

func PerFilterConfigExtAuthzDisabled added in v0.17.4

func PerFilterConfigExtAuthzDisabled() *anypb.Any

PerFilterConfigExtAuthzDisabled returns a per-filter config for ext authz that disables ext-authz.

func ProxyProtocolFilter added in v0.19.0

func ProxyProtocolFilter() *envoy_config_listener_v3.ListenerFilter

ProxyProtocolFilter creates a new Proxy Protocol filter.

func TCPProxyFilter added in v0.19.0

func TCPProxyFilter(clusterName string) *envoy_config_listener_v3.Filter

TCPProxyFilter creates a new TCP Proxy filter.

func TLSInspectorFilter added in v0.19.0

func TLSInspectorFilter() *envoy_config_listener_v3.ListenerFilter

TLSInspectorFilter creates a new TLS inspector filter.

Types

type Builder

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

A Builder builds envoy config from pomerium config.

func New

func New(
	localGRPCAddress string,
	localHTTPAddress string,
	localMetricsAddress string,
	fileManager *filemgr.Manager,
	reproxyHandler *reproxy.Handler,
) *Builder

New creates a new Builder.

func (*Builder) BuildBootstrap added in v0.22.0

func (b *Builder) BuildBootstrap(
	ctx context.Context,
	cfg *config.Config,
	fullyStatic bool,
) (bootstrap *envoy_config_bootstrap_v3.Bootstrap, err error)

BuildBootstrap builds the bootstrap config.

func (*Builder) BuildBootstrapAdmin

func (b *Builder) BuildBootstrapAdmin(cfg *config.Config) (admin *envoy_config_bootstrap_v3.Admin, err error)

BuildBootstrapAdmin builds the admin config for the envoy bootstrap.

func (*Builder) BuildBootstrapDynamicResources added in v0.22.0

func (b *Builder) BuildBootstrapDynamicResources(
	_ *config.Config,
	fullyStatic bool,
) (dynamicResources *envoy_config_bootstrap_v3.Bootstrap_DynamicResources, err error)

BuildBootstrapDynamicResources builds the dynamic resources for the envoy bootstrap.

func (*Builder) BuildBootstrapLayeredRuntime added in v0.15.0

func (b *Builder) BuildBootstrapLayeredRuntime() (*envoy_config_bootstrap_v3.LayeredRuntime, error)

BuildBootstrapLayeredRuntime builds the layered runtime for the envoy bootstrap.

func (*Builder) BuildBootstrapStaticResources

func (b *Builder) BuildBootstrapStaticResources(
	ctx context.Context,
	cfg *config.Config,
	fullyStatic bool,
) (staticResources *envoy_config_bootstrap_v3.Bootstrap_StaticResources, err error)

BuildBootstrapStaticResources builds the static resources for the envoy bootstrap. It includes the control plane cluster.

func (*Builder) BuildBootstrapStatsConfig

func (b *Builder) BuildBootstrapStatsConfig(cfg *config.Config) (*envoy_config_metrics_v3.StatsConfig, error)

BuildBootstrapStatsConfig builds a the stats config the envoy bootstrap.

func (*Builder) BuildClusters

func (b *Builder) BuildClusters(ctx context.Context, cfg *config.Config) ([]*envoy_config_cluster_v3.Cluster, error)

BuildClusters builds envoy clusters from the given config.

func (*Builder) BuildListeners

func (b *Builder) BuildListeners(
	ctx context.Context,
	cfg *config.Config,
	fullyStatic bool,
) ([]*envoy_config_listener_v3.Listener, error)

BuildListeners builds envoy listeners from the given config.

func (*Builder) BuildRouteConfigurations added in v0.22.0

func (b *Builder) BuildRouteConfigurations(
	ctx context.Context,
	cfg *config.Config,
) ([]*envoy_config_route_v3.RouteConfiguration, error)

BuildRouteConfigurations builds the route configurations for the RDS service.

type Endpoint

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

An Endpoint is a URL with its corresponding Transport Socket.

func NewEndpoint

func NewEndpoint(u *url.URL, ts *envoy_config_core_v3.TransportSocket, weight uint32) Endpoint

NewEndpoint creates a new Endpoint.

func (Endpoint) TransportSocketName

func (e Endpoint) TransportSocketName() string

TransportSocketName return the name for this endpoint.

Directories

Path Synopsis
Package filemgr defines a Manager for managing files for the controlplane.
Package filemgr defines a Manager for managing files for the controlplane.

Jump to

Keyboard shortcuts

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