poddeletion

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OpsLifecycleAdapter = &PodDeleteOpsLifecycleAdapter{}
)

Functions

func Add

func Add(mgr ctrl.Manager) error

func AddToMgr

func AddToMgr(mgr ctrl.Manager, r reconcile.Reconciler) error

func InitExpectations

func InitExpectations(c client.Client)

func NewReconciler

func NewReconciler(mgr ctrl.Manager) reconcile.Reconciler

NewReconciler returns a new reconcile.Reconciler

Types

type PodDeleteOpsLifecycleAdapter

type PodDeleteOpsLifecycleAdapter struct {
}

PodDeleteOpsLifecycleAdapter tells PodOpsLifecycle the Pod deletion ops info

func (*PodDeleteOpsLifecycleAdapter) AllowMultiType

func (a *PodDeleteOpsLifecycleAdapter) AllowMultiType() bool

AllowMultiType indicates whether multiple IDs which have the same Type are allowed

func (*PodDeleteOpsLifecycleAdapter) GetID

GetID indicates ID of one PodOpsLifecycle

func (*PodDeleteOpsLifecycleAdapter) GetType

GetType indicates type for an Operator

func (*PodDeleteOpsLifecycleAdapter) WhenBegin

func (a *PodDeleteOpsLifecycleAdapter) WhenBegin(obj client.Object) (bool, error)

WhenBegin will be executed when begin a lifecycle

func (*PodDeleteOpsLifecycleAdapter) WhenFinish

func (a *PodDeleteOpsLifecycleAdapter) WhenFinish(_ client.Object) (bool, error)

WhenFinish will be executed when finish a lifecycle

type PodDeletionReconciler

type PodDeletionReconciler struct {
	*mixin.ReconcilerMixin
	// contains filtered or unexported fields
}

PodDeletionReconciler reconciles and reclaims a Pod object

func (*PodDeletionReconciler) Reconcile

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

Reconcile aims to delete Pod through PodOpsLifecycle. It will watch Pod with deleting indication label. If a Pod is labeled, controller will first trigger a deletion PodOpsLifecycle. If all conditions are satisfied, it will then delete Pod.

type PredicateDeletionIndicatedPod

type PredicateDeletionIndicatedPod struct {
}

func (*PredicateDeletionIndicatedPod) Create

Create returns true if the Create event should be processed

func (*PredicateDeletionIndicatedPod) Delete

Delete returns true if the Delete event should be processed

func (*PredicateDeletionIndicatedPod) Generic

Generic returns true if the Generic event should be processed

func (*PredicateDeletionIndicatedPod) Update

Update returns true if the Update event should be processed

Jump to

Keyboard shortcuts

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