Documentation ¶
Index ¶
- Variables
- func Add(mgr ctrl.Manager) error
- func AddToMgr(mgr ctrl.Manager, r reconcile.Reconciler) error
- func InitExpectations(c client.Client)
- func NewReconciler(mgr ctrl.Manager) reconcile.Reconciler
- type PodDeleteOpsLifecycleAdapter
- func (a *PodDeleteOpsLifecycleAdapter) AllowMultiType() bool
- func (a *PodDeleteOpsLifecycleAdapter) GetID() string
- func (a *PodDeleteOpsLifecycleAdapter) GetType() podopslifecycle.OperationType
- func (a *PodDeleteOpsLifecycleAdapter) WhenBegin(obj client.Object) (bool, error)
- func (a *PodDeleteOpsLifecycleAdapter) WhenFinish(_ client.Object) (bool, error)
- type PodDeletionReconciler
- type PredicateDeletionIndicatedPod
Constants ¶
This section is empty.
Variables ¶
var (
OpsLifecycleAdapter = &PodDeleteOpsLifecycleAdapter{}
)
Functions ¶
func InitExpectations ¶
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 ¶
func (a *PodDeleteOpsLifecycleAdapter) GetID() string
GetID indicates ID of one PodOpsLifecycle
func (*PodDeleteOpsLifecycleAdapter) GetType ¶
func (a *PodDeleteOpsLifecycleAdapter) GetType() podopslifecycle.OperationType
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 ¶
func (p *PredicateDeletionIndicatedPod) Create(e event.CreateEvent) bool
Create returns true if the Create event should be processed
func (*PredicateDeletionIndicatedPod) Delete ¶
func (p *PredicateDeletionIndicatedPod) Delete(e event.DeleteEvent) bool
Delete returns true if the Delete event should be processed
func (*PredicateDeletionIndicatedPod) Generic ¶
func (p *PredicateDeletionIndicatedPod) Generic(e event.GenericEvent) bool
Generic returns true if the Generic event should be processed
func (*PredicateDeletionIndicatedPod) Update ¶
func (p *PredicateDeletionIndicatedPod) Update(e event.UpdateEvent) bool
Update returns true if the Update event should be processed