...

Package finalizers

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

Overview ▾

Constants

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

    RecordFinalizer = "chaos-mesh/records"
)

func ContainsFinalizer

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

ContainsFinalizer checks an Object that the provided finalizer is present.

func NewController

func NewController(mgr ctrl.Manager, client client.Client, logger logr.Logger, recorderBuilder *recorder.RecorderBuilder, pairs Objs) (types.Controller, error)

type Objs

type Objs struct {
    fx.In

    Objs []types.Object `group:"objs"`
}

type Reconciler

Reconciler for common chaos

type Reconciler 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
}

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

Reconcile the common chaos