controller

package
v0.0.0-...-5806c76 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type AmaltheaSessionReconciler

type AmaltheaSessionReconciler struct {
	client.Client
	Scheme        *runtime.Scheme
	MetricsClient metricsv1beta1.PodMetricsesGetter
	ClusterType   amaltheadevv1alpha1.ClusterType
}

AmaltheaSessionReconciler reconciles a AmaltheaSession object

func (*AmaltheaSessionReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the AmaltheaSession object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.16.3/pkg/reconcile

func (*AmaltheaSessionReconciler) SetupWithManager

func (r *AmaltheaSessionReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ChildResource

type ChildResource[T ChildResourceType] struct {
	Current *T
	Desired *T
}

func (ChildResource[T]) Reconcile

type ChildResourceUpdate

type ChildResourceUpdate[T ChildResourceType] struct {
	Manifest     *T
	UpdateResult controllerutil.OperationResult
	Error        error
	// contains filtered or unexported fields
}

type EventsInferedStateResult

type EventsInferedStateResult string
const (
	EisrNone            EventsInferedStateResult = "None"
	EisrInitiallyFailed EventsInferedStateResult = "Initially Failed"
	EisrTemporaryFailed EventsInferedStateResult = "Temporary Failed"
	EisrFinallyFailed   EventsInferedStateResult = "Finally Failed"
	EisrAutoScheduling  EventsInferedStateResult = "Auto Scheduling"
)

func EventsInferedState

eventsInferedFailure looks into the events of the session pod to figure out whether a failure exists. The events are looked at with the latest first, if an event occurs that indicates a scale-up or a scheduled reason, then it is considered non-failing. If the first event encountered is a "FailedScheduling" reason, then it indicates a failure iff this state has occurred for a pre-defined period.

Returns one of: - initially failed: if the latest event is FailedScheduling and none of these has been seen before - temporary failed: if the latest event is FailedScheduling but the wait timeout has not been reached - finally failed: if the latest event is FailedScheduling and this has been seen for a while exceeding maximum wait time - auto scheduling: if an TriggeredScaleUp events has been found as the last event - none of the above

type IdleDecision

type IdleDecision int
const Idle IdleDecision = 1
const NotIdle IdleDecision = 2
const Unknown IdleDecision = 0

The values are setup in a way so that max(x, y, z) where x, y, z are one of the values below will give the final decision.

Jump to

Keyboard shortcuts

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