idler

package
v0.0.0-...-1497edb Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapPodToIdler

func MapPodToIdler(_ context.Context, obj *v1.Pod) []reconcile.Request

MapPodToIdler maps the pod to the idler

Types

type PodIdlerPredicate

type PodIdlerPredicate struct {
}

func (PodIdlerPredicate) Create

Create doesn't trigger reconcile

func (PodIdlerPredicate) Delete

Delete triggers reconcile for users pods to make sure that the deleted pod is not tracked in the status anymore

func (PodIdlerPredicate) Generic

Generic doesn't trigger reconcile

func (PodIdlerPredicate) Update

Update triggers reconcile if the pod runs in users namespace and if either the highest restart count is higher than the threshold or the startTime was newly set in the new version of the pod

type Reconciler

type Reconciler struct {
	Client              client.Client
	Scheme              *runtime.Scheme
	AllNamespacesClient client.Client
	RestClient          rest.Interface
	ScalesClient        scale.ScalesGetter
	DynamicClient       dynamic.Interface
	DiscoveryClient     discovery.ServerResourcesInterface
	GetHostCluster      cluster.GetHostClusterFunc
	Namespace           string
}

Reconciler reconciles an Idler object

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile reads that state of the cluster for an Idler object and makes changes based on the state read and what is in the Idler.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.RequeueAfter > 0 is true, otherwise upon completion it will remove the work from the queue.

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr manager.Manager, allNamespaceCluster runtimeCluster.Cluster) 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