controllers

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Scheme registers the types sandbox controllers need on their client.

Functions

func CacheByObject added in v0.1.4

func CacheByObject() (map[client.Object]cache.ByObject, error)

CacheByObject scopes the manager cache to this controller's labeled children, so no child informer watches the whole cluster.

func MergeVolumeClaimVolumes

func MergeVolumeClaimVolumes(existing, pvcVolumes []corev1.Volume) []corev1.Volume

MergeVolumeClaimVolumes merges PVC-backed volumes into an existing volume list, replacing any volumes with matching names. This follows StatefulSet semantics where volumeClaimTemplate volumes take priority.

Types

type PodMutator

type PodMutator interface {
	MutatePod(context.Context, *sandboxv1beta1.Sandbox, *corev1.Pod) error
}

PodMutator applies runtime-specific defaults to a newly-created Sandbox Pod. Implementations must preserve every field explicitly supplied through the Sandbox API and return an error instead of silently overriding conflicts.

type SandboxReconciler

type SandboxReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	Tracer        asmetrics.Instrumenter
	ClusterDomain string
	PodMutator    PodMutator
}

SandboxReconciler reconciles a Sandbox object.

func (*SandboxReconciler) Reconcile

func (r *SandboxReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile drives a Sandbox toward its declared spec: child Service/Pod/PVCs, status conditions, and expiry.

func (*SandboxReconciler) SetupWithManager

func (r *SandboxReconciler) SetupWithManager(mgr ctrl.Manager, concurrentWorkers int) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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