chaos

package
v1.0.41 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NetworkChaosGVK = schema.GroupVersionKind{
		Group:   "chaos-mesh.org",
		Version: "v1alpha1",
		Kind:    "NetworkChaos",
	}

	PodChaosGVK = schema.GroupVersionKind{
		Group:   "chaos-mesh.org",
		Version: "v1alpha1",
		Kind:    "PodChaos",
	}

	IOChaosGVK = schema.GroupVersionKind{
		Group:   "chaos-mesh.org",
		Version: "v1alpha1",
		Kind:    "IOChaos",
	}

	KernelChaosGVK = schema.GroupVersionKind{
		Group:   "chaos-mesh.org",
		Version: "v1alpha1",
		Kind:    "KernelChaos",
	}

	TimeChaosGVK = schema.GroupVersionKind{
		Group:   "chaos-mesh.org",
		Version: "v1alpha1",
		Kind:    "TimeChaos",
	}
)

Functions

func NewController

func NewController(mgr ctrl.Manager, logger logr.Logger) error

Types

type Condition

type Condition struct {
	Type   ConditionType
	Status corev1.ConditionStatus
	Reason string
}

func (Condition) False added in v1.0.20

func (c Condition) False() bool

func (Condition) True

func (c Condition) True() bool

type ConditionType

type ConditionType string

ConditionType ...

const (
	// ConditionSelected indicates the chaos experiment had correctly selected the target pods
	// where to runJob chaos actions.
	ConditionSelected ConditionType = "Selected"

	// ConditionAllInjected indicates the faults have been successfully injected to all target pods.
	ConditionAllInjected ConditionType = "AllInjected"

	// ConditionAllRecovered indicates the injected faults have been successfully restored from all target pods.
	ConditionAllRecovered ConditionType = "AllRecovered"

	// ConditionPaused  indicates the chaos experiment is in the "Paused" step.
	ConditionPaused ConditionType = "Paused"
)

type Controller

type Controller struct {
	ctrl.Manager
	logr.Logger
	// contains filtered or unexported fields
}

Controller reconciles a Reference object.

func (*Controller) Finalize

func (r *Controller) Finalize(obj client.Object) error

func (*Controller) Finalizer

func (r *Controller) Finalizer() string

func (*Controller) HasFailed added in v1.0.24

func (r *Controller) HasFailed(ctx context.Context, chaos *v1alpha1.Chaos)

func (*Controller) HasSucceed added in v1.0.24

func (r *Controller) HasSucceed(ctx context.Context, chaos *v1alpha1.Chaos)

func (*Controller) PopulateView added in v1.0.24

func (r *Controller) PopulateView(ctx context.Context, req types.NamespacedName) error

func (*Controller) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

type DesiredPhase

type DesiredPhase string
const (
	// RunningPhase target is to make all selected targets (container or pod) into "Injected" phase.
	RunningPhase DesiredPhase = "Run"
	// StoppedPhase target  is to make all selected targets (container or pod) into "NotInjected" phase.
	StoppedPhase DesiredPhase = "Stop"
)

func (DesiredPhase) Run

func (d DesiredPhase) Run() bool

func (DesiredPhase) Stop

func (d DesiredPhase) Stop() bool

type ExperimentStatus

type ExperimentStatus struct {
	DesiredPhase `mapstructure:",omitempty"`
}

type GenericFault added in v1.0.22

type GenericFault = unstructured.Unstructured

type GenericFaultList added in v1.0.24

type GenericFaultList = unstructured.UnstructuredList

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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