podchaos

package
v0.0.0-...-ed4b1df Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CRDName         string = "podchaos.chaos-mesh.org"
	RequiredVersion string = "v1alpha1"

	PodKillAction       string = "pod-kill"
	PodFailureAction    string = "pod-failure"
	ContainerKillAction string = "container-kill"
)

Variables

This section is empty.

Functions

func WithAction

func WithAction(action string) func(*PodChaos)

WithAction overrides the PodChaos Action field.

func WithName

func WithName(name string) func(*PodChaos)

WithName overrides the Name field for a PodChaos object.

func WithSelectorMode

func WithSelectorMode(mode string) func(*PodSelector)

WithSelectorMode overrides the SelectorMode for a PodSelector.

func WithSelectorNamespace

func WithSelectorNamespace(namespaces []string) func(*PodSelector)

WithSelectorNamespace overrides the namespaces for a PodSelector.

Types

type PodChaos

type PodChaos chmv1alpha1.PodChaos

func New

func New(namespace string, selector *PodSelector, opts ...func(*PodChaos)) PodChaos

New returns a PodChaos object configured with a selector and provided options.

func (PodChaos) CheckChaosActive

func (pc PodChaos) CheckChaosActive(ctx context.Context, c runtimeClient.Client) (bool, error)

CheckChaosActive checks if a PodChaos object indicates a successful injection of Chaos action.

func (PodChaos) KubernetesObject

func (pc PodChaos) KubernetesObject() client.Object

GetObject returns the actual PodChaos object

type PodSelector

type PodSelector = chmv1alpha1.PodSelector

func NewPodLabelSelector

func NewPodLabelSelector(labels map[string]string,
	opts ...func(*PodSelector),
) *PodSelector

NewPodLabelSelector returns a new PodSelector configured using labels and provided options.

Jump to

Keyboard shortcuts

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