controller

package
v0.0.0-...-90b817e Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentReconciliation

type AgentReconciliation struct {
	Agent                 *kagentv1alpha3.Agent
	Target                *compiledTarget
	Warnings              []string
	CompilationFailure    *ReconciliationFailure
	ObservedActorTemplate *ateapipb.ActorTemplate
	PreparationFailure    *ReconciliationFailure
}

AgentReconciliation is the complete desired and observed state for one Agent. Compilation failures are data so invalid Agents still produce status instead of disappearing from the graph.

func (AgentReconciliation) Equals

Equals keeps KRT from reflecting over protobuf caches that mutate during reads.

func (AgentReconciliation) ResourceName

func (r AgentReconciliation) ResourceName() string

type AgentRuntimeObservation

type AgentRuntimeObservation struct {
	Namespace  string
	AgentName  string
	RevisionID translator.RevisionID
	Template   *ateapipb.ActorTemplate
	Failure    *ReconciliationFailure
}

AgentRuntimeObservation records a Agent's preparation. The revision prevents a cached observation from making changed inputs ready before reconciliation.

func (AgentRuntimeObservation) Equals

Equals compares runtime contents rather than protobuf's mutable caches.

func (AgentRuntimeObservation) ResourceName

func (p AgentRuntimeObservation) ResourceName() string

type Collections

Collections contains shared Kubernetes inputs and compiled Agent state.

func NewCollections

func NewCollections(client kube.Client, watchNamespaces []string, opts krt.OptionsBuilder, settings *configv1.RuntimeDefaultsConfig, images *configv1.HarnessImagesConfig) Collections

NewCollections creates the complete read-only input graph. An empty watchNamespaces list watches all namespaces.

type Reconciler

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

Reconciler is the side-effect boundary for the pure KRT graph. Collection handlers enqueue stable keys; retries always read the latest derived state.

func NewReconciler

func NewReconciler(config *rest.Config, collections Collections, store runtimeRevisionStore, templates actorTemplateClient) (*Reconciler, error)

NewReconciler creates the Kubernetes and database write boundary. Run starts its queues after the registered KRT handlers have received initial state.

func (*Reconciler) NeedLeaderElection

func (r *Reconciler) NeedLeaderElection() bool

func (*Reconciler) Run

func (r *Reconciler) Run(stop <-chan struct{})

Run waits for the graph boundary to observe initial state, then processes Agent and status writes until stop closes.

func (*Reconciler) Start

func (r *Reconciler) Start(ctx context.Context) error

type ReconciliationFailure

type ReconciliationFailure struct {
	Condition string
	Reason    string
	Message   string
	Retryable bool
}

ReconciliationFailure identifies the condition stage blocked by an Agent.

type Runtime

type Runtime struct {
	Client      kube.Client
	Options     krt.OptionsBuilder
	Collections Collections
}

Runtime owns the Kubernetes client and common options shared by the KRT collections. Collections must be created before Start so their informers are registered before the client starts.

func NewRuntime

func NewRuntime(config *rest.Config, watchNamespaces []string, stop <-chan struct{}, settings *configv1.RuntimeDefaultsConfig, images *configv1.HarnessImagesConfig) (*Runtime, error)

NewRuntime creates the shared KRT client and collection graph. Handlers are deliberately registered separately at the eventual application boundary.

func (*Runtime) Start

func (r *Runtime) Start(ctx context.Context) error

Start starts every informer registered by the KRT collections and keeps them alive until the application shuts down. The API uses installed CRDs directly, so it does not start Istio's cluster-wide delayed-CRD watcher.

type RuntimeRevisionGC

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

RuntimeRevisionGC retries durable runtime deletions independently of preparation.

func NewRuntimeRevisionGC

func NewRuntimeRevisionGC(store runtimeRevisionGCStore, templates runtimeRevisionGCClient, pollInterval time.Duration, provider metric.MeterProvider) (*RuntimeRevisionGC, error)

func (*RuntimeRevisionGC) NeedLeaderElection

func (r *RuntimeRevisionGC) NeedLeaderElection() bool

func (*RuntimeRevisionGC) Start

func (r *RuntimeRevisionGC) Start(ctx context.Context) error

type SandboxReconciler

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

SandboxReconciler owns the queued side effects of SandboxTemplate preparation. Sandbox instance lifecycle remains owned by the PostgreSQL-backed worker.

func NewSandboxReconciler

func NewSandboxReconciler(config *rest.Config, runtime *Runtime, store sandboxRevisionStore, actors actorTemplateClient, policy substrate.SandboxPolicy) (*SandboxReconciler, error)

func (*SandboxReconciler) NeedLeaderElection

func (s *SandboxReconciler) NeedLeaderElection() bool

func (*SandboxReconciler) Start

func (s *SandboxReconciler) Start(ctx context.Context) error

Directories

Path Synopsis
Package remotemcpserver reconciles the discovered tool catalog published in RemoteMCPServer status.
Package remotemcpserver reconciles the discovered tool catalog published in RemoteMCPServer status.
Package toolcatalog normalizes and publishes MCP catalog observations.
Package toolcatalog normalizes and publishes MCP catalog observations.

Jump to

Keyboard shortcuts

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