envoy

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EnvoyProxyContainerName  = "envoy-proxy"
	EnvoyProxyContainerImage = "envoyproxy/envoy:v1.31-latest"
	EnvoyProxyRunAsUser      = 1337
	ProxyInitContainerName   = "proxy-init"
	ProxyInitContainerImage  = "openpolicyagent/proxy_init:v8"
	BasicAuthContainerPort   = 9001
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLog

type AccessLog struct {
	Name        string       `json:"name" yaml:"name"`
	TypedConfig DynamicValue `json:"typed_config" yaml:"typed_config"`
}

type AdditionalAddress

type AdditionalAddress struct {
	Address Address `json:"address" yaml:"address"`
}

type Address

type Address struct {
	SocketAddress        SocketAddress        `json:"socket_address" yaml:"socket_address"`
	Pipe                 Pipe                 `json:"pipe,omitempty" yaml:"pipe,omitempty"`
	EnvoyInternalAddress EnvoyInternalAddress `json:"envoy_internal_address,omitempty" yaml:"envoy_internal_address,omitempty"`
}

type AdminServer

type AdminServer struct {
	AccessLogPath string  `json:"access_log_path" yaml:"access_log_path"`
	Address       Address `json:"address" yaml:"address"`
}

type BootstrapConfig

type BootstrapConfig struct {
	Admin           AdminServer     `yaml:"admin"`
	StaticResources StaticResources `yaml:"static_resources"`
}

BootstrapConfig represents the complete Envoy bootstrap configuration

type BootstrapConfigGenerator

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

func NewBootstrapConfigGenerator

func NewBootstrapConfigGenerator(log logr.Logger) *BootstrapConfigGenerator

func (*BootstrapConfigGenerator) GenerateEnvoyConfig

func (g *BootstrapConfigGenerator) GenerateEnvoyConfig(config *common.KodeResourceConfig, useBasicAuth bool) (string, error)

type Cluster

type Cluster struct {
	Name                          string         `json:"name" yaml:"name"`
	ConnectTimeout                string         `json:"connect_timeout" yaml:"connect_timeout"`
	Type                          string         `json:"type" yaml:"type"`
	LbPolicy                      string         `json:"lb_policy" yaml:"lb_policy"`
	TypedExtensionProtocolOptions DynamicValue   `json:"typed_extension_protocol_options,omitempty" yaml:"typed_extension_protocol_options,omitempty"`
	LoadAssignment                LoadAssignment `json:"load_assignment" yaml:"load_assignment"`
}

type Clusters

type Clusters []Cluster

Slice types

type ConfigGenerator

type ConfigGenerator interface {
	GenerateEnvoyConfig(config *common.KodeResourceConfig, useBasicAuth bool) (string, error)
}

type ContainerConstructor

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

func NewContainerConstructor

func NewContainerConstructor(log logr.Logger, configGenerator ConfigGenerator) *ContainerConstructor

func (*ContainerConstructor) ConstructEnvoyContainers

func (c *ContainerConstructor) ConstructEnvoyContainers(config *common.KodeResourceConfig) ([]corev1.Container, []corev1.Container, error)

type DynamicValue

type DynamicValue struct {
	Value interface{} `json:",inline" yaml:",inline"`
}

Add this type to replace runtime.RawExtension

func (DynamicValue) MarshalJSON

func (d DynamicValue) MarshalJSON() ([]byte, error)

func (DynamicValue) MarshalYAML

func (d DynamicValue) MarshalYAML() (interface{}, error)

func (*DynamicValue) UnmarshalJSON

func (d *DynamicValue) UnmarshalJSON(data []byte) error

Add marshal/unmarshal methods for proper encoding

func (*DynamicValue) UnmarshalYAML

func (d *DynamicValue) UnmarshalYAML(unmarshal func(interface{}) error) error

type Endpoint

type Endpoint struct {
	Address             Address             `json:"address" yaml:"address"`
	HealthCheckConfig   HealthCheckConfig   `json:"health_check_config,omitempty" yaml:"health_check_config,omitempty"`
	Hostname            string              `json:"hostname,omitempty" yaml:"hostname,omitempty"`
	AdditionalAddresses []AdditionalAddress `json:"additional_addresses,omitempty" yaml:"additional_addresses,omitempty"`
}

type EnvoyInternalAddress

type EnvoyInternalAddress struct {
	ServerListenerName string `json:"server_listener_name" yaml:"server_listener_name"`
	EndpointId         string `json:"endpoint_id,omitempty" yaml:"endpoint_id,omitempty"`
}

type Filter

type Filter struct {
	Name        string       `json:"name" yaml:"name"`
	TypedConfig DynamicValue `json:"typed_config" yaml:"typed_config"`
}

type FilterChain

type FilterChain struct {
	Filters []Filter `json:"filters" yaml:"filters"`
}

type Filters

type Filters []Filter

type HTTPConnectionManager

type HTTPConnectionManager struct {
	Type        string             `yaml:"@type"`
	StatPrefix  string             `yaml:"stat_prefix"`
	CodecType   string             `yaml:"codec_type"`
	RouteConfig RouteConfig        `yaml:"route_config"`
	HTTPFilters []HTTPFilterConfig `yaml:"http_filters"`
}

type HTTPFilter

type HTTPFilter struct {
	Name        string       `json:"name" yaml:"name"`
	TypedConfig DynamicValue `json:"typed_config" yaml:"typed_config"`
}

type HTTPFilterConfig

type HTTPFilterConfig struct {
	Name        string       `yaml:"name"`
	TypedConfig DynamicValue `yaml:"typed_config,omitempty"`
}

type HTTPFilters

type HTTPFilters []HTTPFilter

type HealthCheckConfig

type HealthCheckConfig struct {
	PortValue                uint32  `json:"port_value" yaml:"port_value"`
	Hostname                 string  `json:"hostname" yaml:"hostname,omitempty"`
	Address                  Address `json:"address" yaml:"address,omitempty"`
	DisableActiveHealthCheck bool    `json:"disable_active_health_check,omitempty" yaml:"disable_active_health_check,omitempty"`
}

type LbEndpoint

type LbEndpoint struct {
	Endpoint            Endpoint     `json:"endpoint" yaml:"endpoint"`
	HealthStatus        string       `json:"health_status,omitempty" yaml:"health_status,omitempty"`
	Metadata            DynamicValue `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	LoadBalancingWeight uint32       `json:"load_balancing_weight,omitempty" yaml:"load_balancing_weight,omitempty"`
}

type Listener

type Listener struct {
	Name         string        `json:"name" yaml:"name"`
	Address      Address       `json:"address" yaml:"address"`
	FilterChains []FilterChain `json:"filter_chains" yaml:"filter_chains"`
}

type Listeners

type Listeners []Listener

type LoadAssignment

type LoadAssignment struct {
	ClusterName string                `json:"cluster_name" yaml:"cluster_name"`
	Endpoints   []LocalityLbEndpoints `json:"endpoints" yaml:"endpoints"`
	Policy      DynamicValue          `json:"policy,omitempty" yaml:"policy,omitempty"`
}

type Locality

type Locality struct {
	Region  string `json:"region,omitempty" yaml:"region,omitempty"`
	Zone    string `json:"zone,omitempty" yaml:"zone,omitempty"`
	SubZone string `json:"sub_zone,omitempty" yaml:"sub_zone,omitempty"`
}

type LocalityLbEndpoints

type LocalityLbEndpoints struct {
	Locality            Locality     `json:"locality,omitempty" yaml:"locality,omitempty"`
	Metadata            DynamicValue `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	LbEndpoints         []LbEndpoint `json:"lb_endpoints" yaml:"lb_endpoints"`
	LoadBalancingWeight uint32       `json:"load_balancing_weight,omitempty" yaml:"load_balancing_weight,omitempty"`
	Priority            uint32       `json:"priority,omitempty" yaml:"priority,omitempty"`
}

type Match

type Match struct {
	Prefix string `json:"prefix" yaml:"prefix"`
}

type Pipe

type Pipe struct {
	Path string `json:"path" yaml:"path"`
	Mode uint32 `json:"mode,omitempty" yaml:"mode,omitempty"`
}

type Redirect

type Redirect struct {
	HTTPSRedirect bool `json:"https_redirect" yaml:"https_redirect"`
}

type Route

type Route struct {
	Match                Match        `json:"match" yaml:"match"`
	Route                *SingleRoute `json:"route,omitempty" yaml:"route,omitempty"`
	Redirect             *Redirect    `json:"redirect,omitempty" yaml:"redirect,omitempty"`
	TypedPerFilterConfig DynamicValue `json:"typed_per_filter_config,omitempty" yaml:"typed_per_filter_config,omitempty"`
}

type RouteConfig

type RouteConfig struct {
	Name         string        `json:"name" yaml:"name"`
	VirtualHosts []VirtualHost `json:"virtual_hosts" yaml:"virtual_hosts"`
}

type Routes

type Routes []Route

type SingleRoute

type SingleRoute struct {
	Cluster       string `json:"cluster" yaml:"cluster"`
	PrefixRewrite string `json:"prefix_rewrite,omitempty" yaml:"prefix_rewrite,omitempty"`
}

type SocketAddress

type SocketAddress struct {
	Address   string `json:"address" yaml:"address"`
	Protocol  string `json:"protocol,omitempty" yaml:"protocol,omitempty"`
	PortValue uint32 `json:"port_value,omitempty" yaml:"port_value,omitempty"`
}

type StaticResources

type StaticResources struct {
	Listeners []Listener `yaml:"listeners"`
	Clusters  []Cluster  `yaml:"clusters"`
}

type UpgradeConfig

type UpgradeConfig struct {
	UpgradeType string `json:"upgrade_type" yaml:"upgrade_type"`
}

type VirtualHost

type VirtualHost struct {
	Name    string   `json:"name" yaml:"name"`
	Domains []string `json:"domains" yaml:"domains"`
	Routes  []Route  `json:"routes" yaml:"routes"`
}

Jump to

Keyboard shortcuts

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