controller

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: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AutoProvision controls whether the controller will be responsible for provisioning dynamic
	// infrastructure for the Gateway API.
	AutoProvision = true
)
View Source
const (
	GatewayAutoDeployAnnotationKey = "gateway2.solo.io/auto-deploy"
)

Variables

This section is empty.

Functions

func NewBaseGatewayController

func NewBaseGatewayController(ctx context.Context, cfg GatewayConfig) error

func Start

func Start(ctx context.Context, cfg StartConfig) error

Start runs the controllers responsible for processing the K8s Gateway API objects It is intended to be run in a goroutine as the function will block until the supplied context is cancelled

Types

type GatewayConfig

type GatewayConfig struct {
	Mgr            manager.Manager
	GWClass        apiv1.ObjectName
	Dev            bool
	ControllerName string
	AutoProvision  bool
	Kick           func(ctx context.Context)

	ControlPlane bootstrap.ControlPlane
}

type ObjList

type ObjList[T any, PT Object[T]] struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Items           []T `json:"items" protobuf:"bytes,2,rep,name=items"`
}

func (*ObjList[T, PT]) DeepCopyObject

func (t *ObjList[T, PT]) DeepCopyObject() runtime.Object

func (*ObjList[T, PT]) EachListItem

func (t *ObjList[T, PT]) EachListItem(f func(runtime.Object) error) error

func (*ObjList[T, PT]) EachListItemWithAlloc

func (t *ObjList[T, PT]) EachListItemWithAlloc(f func(runtime.Object) error) error

func (*ObjList[T, PT]) GetObjectKind

func (t *ObjList[T, PT]) GetObjectKind() schema.ObjectKind

func (*ObjList[T, PT]) IsList

func (t *ObjList[T, PT]) IsList() bool

func (*ObjList[T, PT]) NewEmptyInstance

func (t *ObjList[T, PT]) NewEmptyInstance() runtime.Unstructured

func (*ObjList[T, PT]) SetUnstructuredContent

func (t *ObjList[T, PT]) SetUnstructuredContent(map[string]interface{})

func (*ObjList[T, PT]) UnstructuredContent

func (t *ObjList[T, PT]) UnstructuredContent() map[string]interface{}

type Object

type Object[T any] interface {
	*T
	client.Object
}

type StartConfig

type StartConfig struct {
	Dev          bool
	ControlPlane bootstrap.ControlPlane
	Settings     *v1.Settings

	// ExtensionsFactory is the factory function which will return an extensions.K8sGatewayExtensions
	// This is responsible for producing the extension points that this controller requires
	ExtensionsFactory extensions.K8sGatewayExtensionsFactory

	// GlooPluginRegistryFactory is the factory function to produce a PluginRegistry
	// The plugins in this registry are used during the conversion of a Proxy resource into an xDS Snapshot
	GlooPluginRegistryFactory plugins.PluginRegistryFactory

	// ProxyClient is the client that writes Proxy resources into an in-memory cache
	// This cache is utilized by the debug.ProxyEndpointServer
	ProxyClient v1.ProxyClient
}

type TypedClient

type TypedClient[T any, PT Object[T]] struct {
	Cli    client.Client
	Scheme *runtime.Scheme
}

func (TypedClient[T, PT]) Get

func (t TypedClient[T, PT]) Get(ctx context.Context, key client.ObjectKey, opts ...client.GetOption) (*T, error)

func (TypedClient[T, PT]) List

func (t TypedClient[T, PT]) List(ctx context.Context, opts ...client.ListOption) ([]T, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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