...

Package finalizers

import "github.com/chaos-mesh/chaos-mesh/controllers/common/finalizers"
Overview
Index

Overview ▾

Constants

const (
    // AnnotationCleanFinalizer key
    AnnotationCleanFinalizer = `chaos-mesh.chaos-mesh.org/cleanFinalizer`
    // AnnotationCleanFinalizerForced value
    AnnotationCleanFinalizerForced = `forced`

    RecordFinalizer = "chaos-mesh/records"
)

func CleanStep

func CleanStep(ctx *pipeline.PipelineContext) reconcile.Reconciler

func ContainsFinalizer

func ContainsFinalizer(o metav1.Object, finalizer string) bool

ContainsFinalizer checks an Object that the provided finalizer is present.

func InitStep

func InitStep(ctx *pipeline.PipelineContext) reconcile.Reconciler

type CleanReconciler

CleanReconciler for common chaos to clean the finalizer

type CleanReconciler struct {
    ReconcilerMeta
}

func (*CleanReconciler) Reconcile

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

Reconcile the common chaos to clean the finalizer

type InitReconciler

InitReconciler for common chaos to init the finalizer

type InitReconciler struct {
    ReconcilerMeta
}

func (*InitReconciler) Reconcile

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

Reconcile the common chaos to init the finalizer

type ReconcilerMeta

ReconcilerMeta defines the meta of InitReconciler and CleanReconciler struct.

type ReconcilerMeta struct {
    // Object is used to mark the target type of this Reconciler
    Object v1alpha1.InnerObject

    // Client is used to operate on the Kubernetes cluster
    client.Client

    Recorder recorder.ChaosRecorder

    Log logr.Logger
}