controller

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyIndexing

func ApplyIndexing(ctx context.Context, indexer func(ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc) error) error

ApplyIndexing applies indexing to the given indexer. This is exported for testing purposes.

func MustInitializeScheme

func MustInitializeScheme(scheme *runtime.Scheme)

MustInitializeScheme initializes the scheme with the necessary schemas for the AI Gateway. This is exported for the testing purposes.

func NewSecretController

func NewSecretController(client client.Client, kubeClient kubernetes.Interface,
	logger logr.Logger, syncBackendSecurityPolicy syncBackendSecurityPolicyFn,
) reconcile.TypedReconciler[reconcile.Request]

NewSecretController creates a new reconcile.TypedReconciler[reconcile.Request] for corev1.Secret.

func StartControllers

func StartControllers(ctx context.Context, config *rest.Config, logger logr.Logger, options Options) error

StartControllers starts the controllers for the AI Gateway. This blocks until the manager is stopped.

Note: this is tested with envtest, hence the test exists outside of this package. See /tests/controller_test.go.

Types

type AIBackendController

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

AIBackendController implements reconcile.TypedReconciler for aigv1a1.AIServiceBackend.

Exported for testing purposes.

func NewAIServiceBackendController

func NewAIServiceBackendController(client client.Client, kube kubernetes.Interface, logger logr.Logger, syncRoute syncAIGatewayRouteFn) *AIBackendController

NewAIServiceBackendController creates a new reconcile.TypedReconciler for aigv1a1.AIServiceBackend.

func (*AIBackendController) Reconcile

Reconcile implements the reconcile.TypedReconciler for aigv1a1.AIServiceBackend.

type AIGatewayRouteController

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

AIGatewayRouteController implements reconcile.TypedReconciler.

This handles the AIGatewayRoute resource and creates the necessary resources for the external process.

Exported for testing purposes.

func NewAIGatewayRouteController

func NewAIGatewayRouteController(
	client client.Client, kube kubernetes.Interface, logger logr.Logger,
	extProcImage, extProcLogLevel string,
) *AIGatewayRouteController

NewAIGatewayRouteController creates a new reconcile.TypedReconciler[reconcile.Request] for the AIGatewayRoute resource.

func (*AIGatewayRouteController) Reconcile

Reconcile implements reconcile.TypedReconciler.

type BackendSecurityPolicyController

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

BackendSecurityPolicyController implements reconcile.TypedReconciler for aigv1a1.BackendSecurityPolicy.

Exported for testing purposes.

func NewBackendSecurityPolicyController

func NewBackendSecurityPolicyController(client client.Client, kube kubernetes.Interface, logger logr.Logger, syncAIServiceBackend syncAIServiceBackendFn) *BackendSecurityPolicyController

func (*BackendSecurityPolicyController) Reconcile

func (c *BackendSecurityPolicyController) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err error)

Reconcile implements the reconcile.TypedReconciler for aigv1a1.BackendSecurityPolicy.

type Options

type Options struct {
	ExtProcLogLevel      string
	ExtProcImage         string
	EnableLeaderElection bool
}

Options defines the program configurable options that may be passed on the command line.

Directories

Path Synopsis
Package rotators provides credential rotation implementations.
Package rotators provides credential rotation implementations.

Jump to

Keyboard shortcuts

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