Documentation
¶
Index ¶
- func MapPodToIdler(_ context.Context, obj *v1.Pod) []reconcile.Request
- type PodIdlerPredicate
- func (PodIdlerPredicate) Create(_ runtimeevent.TypedCreateEvent[*corev1.Pod]) bool
- func (PodIdlerPredicate) Delete(event runtimeevent.TypedDeleteEvent[*corev1.Pod]) bool
- func (p PodIdlerPredicate) Generic(_ runtimeevent.TypedGenericEvent[*corev1.Pod]) bool
- func (p PodIdlerPredicate) Update(event runtimeevent.TypedUpdateEvent[*corev1.Pod]) bool
- type Reconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PodIdlerPredicate ¶
type PodIdlerPredicate struct {
}
func (PodIdlerPredicate) Create ¶
func (PodIdlerPredicate) Create(_ runtimeevent.TypedCreateEvent[*corev1.Pod]) bool
Create doesn't trigger reconcile
func (PodIdlerPredicate) Delete ¶
func (PodIdlerPredicate) Delete(event runtimeevent.TypedDeleteEvent[*corev1.Pod]) bool
Delete triggers reconcile for users pods to make sure that the deleted pod is not tracked in the status anymore
func (PodIdlerPredicate) Generic ¶
func (p PodIdlerPredicate) Generic(_ runtimeevent.TypedGenericEvent[*corev1.Pod]) bool
Generic doesn't trigger reconcile
func (PodIdlerPredicate) Update ¶
func (p PodIdlerPredicate) Update(event runtimeevent.TypedUpdateEvent[*corev1.Pod]) bool
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 ¶
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.