setup

package
v1.17.0-beta12 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 76 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultXdsBindAddr        = fmt.Sprintf("0.0.0.0:%v", defaults.GlooXdsPort)
	DefaultValidationBindAddr = fmt.Sprintf("0.0.0.0:%v", defaults.GlooValidationPort)
	DefaultRestXdsBindAddr    = fmt.Sprintf("0.0.0.0:%v", defaults.GlooRestXdsPort)
	DefaultProxyDebugAddr     = fmt.Sprintf("0.0.0.0:%v", defaults.GlooProxyDebugPort)
)
View Source
var AcceptAllResourcesByDefault = true

TODO: (copied from gateway) switch AcceptAllResourcesByDefault to false after validation has been tested in user environments

View Source
var AllowWarnings = true
View Source
var ErrNilExtension = func(name string) error {
	return errors.Errorf("Extensions.%s must be defined, found nil", name)
}

Functions

func ExecuteAsynchronousStartFuncs added in v1.17.0

func ExecuteAsynchronousStartFuncs(
	ctx context.Context,
	opts bootstrap.Opts,
	extensions Extensions,
	startFuncs map[string]StartFunc,
	errorGroup *errgroup.Group,
)

ExecuteAsynchronousStartFuncs accepts a collection of StartFunc inputs, and executes them within an Error Group

func NewControlPlane

func NewControlPlane(ctx context.Context, grpcServer *grpc.Server, bindAddr net.Addr, callbacks xdsserver.Callbacks, start bool) bootstrap.ControlPlane

func NewProxyDebugServer added in v1.9.25

func NewProxyDebugServer(ctx context.Context, grpcServer *grpc.Server, bindAddr net.Addr, start bool) bootstrap.ProxyDebugServer

func NewSetupFunc

func NewSetupFunc() setuputils.SetupFunc

func NewSetupFuncWithExtensions

func NewSetupFuncWithExtensions(extensions Extensions) setuputils.SetupFunc

used outside of this repo

func NewSetupFuncWithRun

func NewSetupFuncWithRun(runFunc RunFunc) setuputils.SetupFunc

for use by UDS, FDS, other v1.SetupSyncers

func NewSetupFuncWithRunAndExtensions

func NewSetupFuncWithRunAndExtensions(runFunc RunFunc, extensions *Extensions) setuputils.SetupFunc

Called directly by GlooEE

func NewValidationServer

func NewValidationServer(ctx context.Context, grpcServer *grpc.Server, bindAddr net.Addr, start bool) bootstrap.ValidationServer

func RunGloo

func RunGloo(opts bootstrap.Opts) error

func RunGlooWithExtensions

func RunGlooWithExtensions(opts bootstrap.Opts, extensions Extensions) error

RunGlooWithExtensions is the core entrypoint to the Gloo components. THIS FUNCTION MUST NOT BLOCK:

It is invoked by an outer control loop (SetupFunc) which monitors
the current Settings resource, and re-runs this function each time the global Settings change

This function is called directly by GlooEE

Types

type Extensions

type Extensions struct {
	// PluginRegistryFactory is responsible for creating an xDS PluginRegistry
	// This is the set of plugins which are executed when converting a Proxy into an xDS Snapshot
	PluginRegistryFactory plugins.PluginRegistryFactory

	// SyncerExtensions perform additional syncing logic on a given ApiSnapshot
	// These are used to inject the syncers that process Enterprise-only APIs (AuthConfig, RateLimitConfig)
	SyncerExtensions []syncer.TranslatorSyncerExtensionFactory

	// XdsCallbacks are asynchronous callbacks to perform during xds communication
	XdsCallbacks xdsserver.Callbacks

	// ApiEmitterChannel is a channel that forces the API Emitter to emit a new API Snapshot
	ApiEmitterChannel chan struct{}

	// K8sGatewayExtensionsFactory is the factory function which will return an extensions.K8sGatewayExtensions
	// This is responsible for producing the extension points that the K8s Gateway integration requires
	K8sGatewayExtensionsFactory extensions.K8sGatewayExtensionsFactory
}

Extensions contains the set of extension points for Gloo. These are the injectable pieces of code, which we use to define separate implementations of our Open Source and Enterprise Control Plane implementations. See RunGlooWithExtensions for where this is used.

func (Extensions) Validate added in v1.17.0

func (e Extensions) Validate() error

Validate returns an error if the Extensions are invalid, nil otherwise

type RunFunc

type RunFunc func(opts bootstrap.Opts) error

type StartFunc added in v1.17.0

type StartFunc func(ctx context.Context, opts bootstrap.Opts, extensions Extensions) error

StartFunc represents a function that will be called with the initialized bootstrap.Opts and Extensions. This is invoked each time the setup_syncer is executed (which runs whenever the Setting CR is modified)

func K8sGatewayControllerStartFunc added in v1.17.0

func K8sGatewayControllerStartFunc() StartFunc

K8sGatewayControllerStartFunc returns a StartFunc to run the k8s Gateway controller

Jump to

Keyboard shortcuts

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