v1alpha1

package module
v0.0.0-...-e541717 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: Apache-2.0 Imports: 30 Imported by: 9

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the chaosmesh v1alpha1 API group +kubebuilder:object:generate=true +groupName=chaos-mesh.org

Index

Constants

View Source
const (
	// PauseAnnotationKey defines the annotation used to pause a chaos
	PauseAnnotationKey = "experiment.chaos-mesh.org/pause"
	LabelManagedBy     = "managed-by"
)
View Source
const (
	// DefaultJitter defines default value for jitter
	DefaultJitter = "0ms"

	// DefaultCorrelation defines default value for correlation
	DefaultCorrelation = "0"
)
View Source
const (
	LabelControlledBy = "chaos-mesh.org/controlled-by"
	LabelWorkflow     = "chaos-mesh.org/workflow"
)
View Source
const (
	EntryCreated                string = "EntryCreated"
	InvalidEntry                string = "InvalidEntry"
	WorkflowAccomplished        string = "WorkflowAccomplished"
	NodeAccomplished            string = "NodeAccomplished"
	NodesCreated                string = "NodesCreated"
	NodeDeadlineExceed          string = "NodeDeadlineExceed"
	NodeDeadlineNotExceed       string = "NodeDeadlineNotExceed"
	NodeDeadlineOmitted         string = "NodeDeadlineOmitted"
	ParentNodeDeadlineExceed    string = "ParentNodeDeadlineExceed"
	ChaosCRCreated              string = "ChaosCRCreated"
	ChaosCRCreateFailed         string = "ChaosCRCreateFailed"
	ChaosCRDeleted              string = "ChaosCRDeleted"
	ChaosCRDeleteFailed         string = "ChaosCRDeleteFailed"
	ChaosCRNotExists            string = "ChaosCRNotExists"
	TaskPodSpawned              string = "TaskPodSpawned"
	TaskPodSpawnFailed          string = "TaskPodSpawnFailed"
	TaskPodPodCompleted         string = "TaskPodPodCompleted"
	ConditionalBranchesSelected string = "ConditionalBranchesSelected"
	RerunBySpecChanged          string = "RerunBySpecChanged"
)

Reasons

View Source
const DefaultJVMAgentPort int32 = 9277
View Source
const KindAWSChaos = "AWSChaos"
View Source
const KindDNSChaos = "DNSChaos"
View Source
const KindGCPChaos = "GCPChaos"
View Source
const KindHTTPChaos = "HTTPChaos"
View Source
const KindIOChaos = "IOChaos"
View Source
const KindJVMChaos = "JVMChaos"
View Source
const KindKernelChaos = "KernelChaos"
View Source
const KindNetworkChaos = "NetworkChaos"
View Source
const KindPhysicalMachineChaos = "PhysicalMachineChaos"
View Source
const KindPodChaos = "PodChaos"
View Source
const KindPodHttpChaos = "PodHttpChaos"
View Source
const KindPodIOChaos = "PodIOChaos"
View Source
const KindPodNetworkChaos = "PodNetworkChaos"
View Source
const KindSchedule = "Schedule"
View Source
const KindStressChaos = "StressChaos"
View Source
const KindTimeChaos = "TimeChaos"
View Source
const KindWorkflow = "Workflow"
View Source
const KindWorkflowNode = "WorkflowNode"
View Source
const (
	// ValidateValueParseError defines the error message for value parse error
	ValidateValueParseError = "parse value field error:%s"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "chaos-mesh.org", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var AWSChaosWebhookLog = logf.Log.WithName("AWSChaos-resource")
View Source
var DNSChaosWebhookLog = logf.Log.WithName("DNSChaos-resource")
View Source
var ErrCanNotUpdateChaos = fmt.Errorf("Cannot update chaos spec")

updating spec of a chaos will have no effect, we'd better reject it

View Source
var GCPChaosWebhookLog = logf.Log.WithName("GCPChaos-resource")
View Source
var HTTPChaosWebhookLog = logf.Log.WithName("HTTPChaos-resource")
View Source
var IOChaosWebhookLog = logf.Log.WithName("IOChaos-resource")
View Source
var JVMChaosWebhookLog = logf.Log.WithName("JVMChaos-resource")
View Source
var KernelChaosWebhookLog = logf.Log.WithName("KernelChaos-resource")
View Source
var NetworkChaosWebhookLog = logf.Log.WithName("NetworkChaos-resource")
View Source
var PhysicalMachineChaosWebhookLog = logf.Log.WithName("PhysicalMachineChaos-resource")
View Source
var PodChaosWebhookLog = logf.Log.WithName("PodChaos-resource")
View Source
var PodHttpChaosWebhookLog = logf.Log.WithName("PodHttpChaos-resource")
View Source
var PodIOChaosWebhookLog = logf.Log.WithName("PodIOChaos-resource")
View Source
var PodNetworkChaosWebhookLog = logf.Log.WithName("PodNetworkChaos-resource")
View Source
var StandardCronParser = cron.NewParser(
	cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor,
)
View Source
var StressChaosWebhookLog = logf.Log.WithName("StressChaos-resource")
View Source
var TimeChaosWebhookLog = logf.Log.WithName("TimeChaos-resource")

Functions

func AllKinds

func AllKinds() map[string]*ChaosKind

AllKinds returns all chaos kinds, key is name of Kind, value is an accessor for spawning Object and List

func AllKindsIncludeScheduleAndWorkflow

func AllKindsIncludeScheduleAndWorkflow() map[string]*ChaosKind

func AllScheduleItemKinds

func AllScheduleItemKinds() map[string]*ChaosKind

AllKinds returns all chaos kinds.

func CheckPercent

func CheckPercent(p string, allowZero bool) bool

func CheckPid

func CheckPid(pid int) error

func ConvertUnitToBytes

func ConvertUnitToBytes(nu string) (uint64, error)

func FetchChaosByTemplateType

func FetchChaosByTemplateType(templateType TemplateType) (runtime.Object, error)

func IsChaosTemplateType

func IsChaosTemplateType(target TemplateType) bool

func ParseUnit

func ParseUnit(s string) (uint64, error)

ParseUnit parse a digit with unit such as "K" , "KiB", "KB", "c", "MiB", "MB", "M". If input string is a digit without unit , it will be regarded as a digit with unit M(1024*1024 bytes).

func RegisterPodHttpHandler

func RegisterPodHttpHandler(newHandler PodHttpChaosHandler)

RegisterPodHttpHandler registers handler into webhook

Types

type AWSChaos

type AWSChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AWSChaosSpec   `json:"spec"`
	Status AWSChaosStatus `json:"status,omitempty"`
}

AWSChaos is the Schema for the awschaos API

func (*AWSChaos) DeepCopy

func (in *AWSChaos) DeepCopy() *AWSChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSChaos.

func (*AWSChaos) DeepCopyInto

func (in *AWSChaos) DeepCopyInto(out *AWSChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AWSChaos) DeepCopyObject

func (in *AWSChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*AWSChaos) Default

func (in *AWSChaos) Default()

func (*AWSChaos) DurationExceeded

func (in *AWSChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*AWSChaos) GetObjectMeta

func (in *AWSChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*AWSChaos) GetSelectorSpecs

func (obj *AWSChaos) GetSelectorSpecs() map[string]interface{}

func (*AWSChaos) GetSpecAndMetaString

func (in *AWSChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*AWSChaos) GetStatus

func (in *AWSChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*AWSChaos) IsDeleted

func (in *AWSChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*AWSChaos) IsOneShot

func (in *AWSChaos) IsOneShot() bool

func (*AWSChaos) IsPaused

func (in *AWSChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*AWSChaos) Validate

func (in *AWSChaos) Validate() error

func (*AWSChaos) ValidateCreate

func (in *AWSChaos) ValidateCreate() error

func (*AWSChaos) ValidateDelete

func (in *AWSChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*AWSChaos) ValidateUpdate

func (in *AWSChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type AWSChaosAction

type AWSChaosAction string

AWSChaosAction represents the chaos action about aws.

const (
	// Ec2Stop represents the chaos action of stopping ec2.
	Ec2Stop AWSChaosAction = "ec2-stop"
	// Ec2Restart represents the chaos action of restarting ec2.
	Ec2Restart AWSChaosAction = "ec2-restart"
	// DetachVolume represents the chaos action of detaching the volume of ec2.
	DetachVolume AWSChaosAction = "detach-volume"
)

func (*AWSChaosAction) Validate

func (in *AWSChaosAction) Validate(root interface{}, path *field.Path) field.ErrorList

ValidateScheduler validates the scheduler and duration

type AWSChaosList

type AWSChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AWSChaos `json:"items"`
}

AWSChaosList contains a list of AWSChaos

func (*AWSChaosList) DeepCopy

func (in *AWSChaosList) DeepCopy() *AWSChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSChaosList.

func (*AWSChaosList) DeepCopyInto

func (in *AWSChaosList) DeepCopyInto(out *AWSChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AWSChaosList) DeepCopyList

func (in *AWSChaosList) DeepCopyList() GenericChaosList

func (*AWSChaosList) DeepCopyObject

func (in *AWSChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*AWSChaosList) GetItems

func (in *AWSChaosList) GetItems() []GenericChaos

func (*AWSChaosList) ListChaos

func (in *AWSChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type AWSChaosSpec

type AWSChaosSpec struct {
	// Action defines the specific aws chaos action.
	// Supported action: ec2-stop / ec2-restart / detach-volume
	// Default action: ec2-stop
	// +kubebuilder:validation:Enum=ec2-stop;ec2-restart;detach-volume
	Action AWSChaosAction `json:"action"`

	// Duration represents the duration of the chaos action.
	// +optional
	Duration *string `json:"duration,omitempty" webhook:"Duration"`

	// SecretName defines the name of kubernetes secret.
	// +optional
	SecretName *string `json:"secretName,omitempty" webhook:",nilable"`

	AWSSelector `json:",inline"`
}

AWSChaosSpec is the content of the specification for an AWSChaos

func (*AWSChaosSpec) DeepCopy

func (in *AWSChaosSpec) DeepCopy() *AWSChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSChaosSpec.

func (*AWSChaosSpec) DeepCopyInto

func (in *AWSChaosSpec) DeepCopyInto(out *AWSChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AWSChaosSpec) GetDuration

func (in *AWSChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

type AWSChaosStatus

type AWSChaosStatus struct {
	ChaosStatus `json:",inline"`
}

AWSChaosStatus represents the status of an AWSChaos

func (*AWSChaosStatus) DeepCopy

func (in *AWSChaosStatus) DeepCopy() *AWSChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSChaosStatus.

func (*AWSChaosStatus) DeepCopyInto

func (in *AWSChaosStatus) DeepCopyInto(out *AWSChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AWSDeviceName

type AWSDeviceName string

func (*AWSDeviceName) Validate

func (in *AWSDeviceName) Validate(root interface{}, path *field.Path) field.ErrorList

type AWSSelector

type AWSSelector struct {

	// Endpoint indicates the endpoint of the aws server. Just used it in test now.
	// +optional
	Endpoint *string `json:"endpoint,omitempty"`

	// AWSRegion defines the region of aws.
	AWSRegion string `json:"awsRegion"`

	// Ec2Instance indicates the ID of the ec2 instance.
	Ec2Instance string `json:"ec2Instance"`

	// EbsVolume indicates the ID of the EBS volume.
	// Needed in detach-volume.
	// +optional
	EbsVolume *string `json:"volumeID,omitempty" webhook:"EbsVolume,nilable"`

	// DeviceName indicates the name of the device.
	// Needed in detach-volume.
	// +optional
	DeviceName *string `json:"deviceName,omitempty" webhook:"AWSDeviceName,nilable"`
}

func (*AWSSelector) DeepCopy

func (in *AWSSelector) DeepCopy() *AWSSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSSelector.

func (*AWSSelector) DeepCopyInto

func (in *AWSSelector) DeepCopyInto(out *AWSSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AWSSelector) Id

func (selector *AWSSelector) Id() string

type AttrOverrideSpec

type AttrOverrideSpec struct {
	//+optional
	Ino *uint64 `json:"ino,omitempty"`
	//+optional
	Size *uint64 `json:"size,omitempty"`
	//+optional
	Blocks *uint64 `json:"blocks,omitempty"`
	//+optional
	Atime *Timespec `json:"atime,omitempty"`
	//+optional
	Mtime *Timespec `json:"mtime,omitempty"`
	//+optional
	Ctime *Timespec `json:"ctime,omitempty"`
	//+optional
	Kind *FileType `json:"kind,omitempty"`
	//+optional
	Perm *uint16 `json:"perm,omitempty"`
	//+optional
	Nlink *uint32 `json:"nlink,omitempty"`
	//+optional
	UID *uint32 `json:"uid,omitempty"`
	//+optional
	GID *uint32 `json:"gid,omitempty"`
	//+optional
	Rdev *uint32 `json:"rdev,omitempty"`
}

AttrOverrideSpec represents an override of attribution

func (*AttrOverrideSpec) DeepCopy

func (in *AttrOverrideSpec) DeepCopy() *AttrOverrideSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttrOverrideSpec.

func (*AttrOverrideSpec) DeepCopyInto

func (in *AttrOverrideSpec) DeepCopyInto(out *AttrOverrideSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BandwidthSpec

type BandwidthSpec struct {
	// Rate is the speed knob. Allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second.
	Rate string `json:"rate" webhook:"Rate"`
	// Limit is the number of bytes that can be queued waiting for tokens to become available.
	// +kubebuilder:validation:Minimum=1
	Limit uint32 `json:"limit"`
	// Buffer is the maximum amount of bytes that tokens can be available for instantaneously.
	// +kubebuilder:validation:Minimum=1
	Buffer uint32 `json:"buffer"`
	// Peakrate is the maximum depletion rate of the bucket.
	// The peakrate does not need to be set, it is only necessary
	// if perfect millisecond timescale shaping is required.
	// +optional
	// +kubebuilder:validation:Minimum=0
	Peakrate *uint64 `json:"peakrate,omitempty"`
	// Minburst specifies the size of the peakrate bucket. For perfect
	// accuracy, should be set to the MTU of the interface.  If a
	// peakrate is needed, but some burstiness is acceptable, this
	// size can be raised. A 3000 byte minburst allows around 3mbit/s
	// of peakrate, given 1000 byte packets.
	// +optional
	// +kubebuilder:validation:Minimum=0
	Minburst *uint32 `json:"minburst,omitempty"`
}

BandwidthSpec defines detail of bandwidth limit.

func (*BandwidthSpec) DeepCopy

func (in *BandwidthSpec) DeepCopy() *BandwidthSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BandwidthSpec.

func (*BandwidthSpec) DeepCopyInto

func (in *BandwidthSpec) DeepCopyInto(out *BandwidthSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Bytes

type Bytes string

func (*Bytes) Validate

func (in *Bytes) Validate(root interface{}, path *field.Path) field.ErrorList

type CPUStressor

type CPUStressor struct {
	Stressor `json:",inline"`
	// Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100
	// is full loading.
	// +optional
	Load *int `json:"load,omitempty"`

	// extend stress-ng options
	// +optional
	Options []string `json:"options,omitempty"`
}

CPUStressor defines how to stress CPU out

func (*CPUStressor) DeepCopy

func (in *CPUStressor) DeepCopy() *CPUStressor

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUStressor.

func (*CPUStressor) DeepCopyInto

func (in *CPUStressor) DeepCopyInto(out *CPUStressor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChainDirection

type ChainDirection string

ChainDirection represents the direction of chain

const (
	// Input means this chain is linked with INPUT chain
	Input ChainDirection = "input"

	// Output means this chain is linked with OUTPUT chain
	Output ChainDirection = "output"
)

type ChaosCondition

type ChaosCondition struct {
	Type   ChaosConditionType     `json:"type"`
	Status corev1.ConditionStatus `json:"status"`
	// +optional
	Reason string `json:"reason"`
}

func (*ChaosCondition) DeepCopy

func (in *ChaosCondition) DeepCopy() *ChaosCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosCondition.

func (*ChaosCondition) DeepCopyInto

func (in *ChaosCondition) DeepCopyInto(out *ChaosCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChaosConditionType

type ChaosConditionType string
const (
	ConditionSelected     ChaosConditionType = "Selected"
	ConditionAllInjected  ChaosConditionType = "AllInjected"
	ConditionAllRecovered ChaosConditionType = "AllRecovered"
	ConditionPaused       ChaosConditionType = "Paused"
)

type ChaosKind

type ChaosKind struct {
	// contains filtered or unexported fields
}

ChaosKind includes one kind of chaos and its list type

func (*ChaosKind) SpawnList

func (it *ChaosKind) SpawnList() GenericChaosList

SpawnList will deepcopy a clean list for the acquired kind of chaos as placeholder

func (*ChaosKind) SpawnObject

func (it *ChaosKind) SpawnObject() client.Object

SpawnObject will deepcopy a clean struct for the acquired kind as placeholder

type ChaosOnlyScheduleSpec

type ChaosOnlyScheduleSpec struct {
	Schedule string `json:"schedule"`

	// +optional
	// +nullable
	// +kubebuilder:validation:Minimum=0
	StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds"`

	// +optional
	// +kubebuilder:validation:Enum=Forbid;Allow
	ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy"`

	// +optional
	// +kubebuilder:validation:Minimum=1
	HistoryLimit int `json:"historyLimit,omitempty"`

	// TODO: use a custom type, as `TemplateType` contains other possible values
	Type ScheduleTemplateType `json:"type"`

	EmbedChaos `json:",inline"`
}

ChaosOnlyScheduleSpec is very similar with ScheduleSpec, but it could not schedule Workflow because we could not resolve nested CRD now

func (*ChaosOnlyScheduleSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosOnlyScheduleSpec.

func (*ChaosOnlyScheduleSpec) DeepCopyInto

func (in *ChaosOnlyScheduleSpec) DeepCopyInto(out *ChaosOnlyScheduleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChaosStatus

type ChaosStatus struct {
	// Conditions represents the current global condition of the chaos
	// +optional
	Conditions []ChaosCondition `json:"conditions,omitempty"`

	// Experiment records the last experiment state.
	Experiment ExperimentStatus `json:"experiment"`
}

func (*ChaosStatus) DeepCopy

func (in *ChaosStatus) DeepCopy() *ChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosStatus.

func (*ChaosStatus) DeepCopyInto

func (in *ChaosStatus) DeepCopyInto(out *ChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClockIds

type ClockIds []string

func (ClockIds) DeepCopy

func (in ClockIds) DeepCopy() ClockIds

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClockIds.

func (ClockIds) DeepCopyInto

func (in ClockIds) DeepCopyInto(out *ClockIds)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClockIds) Default

func (in *ClockIds) Default(root interface{}, field *reflect.StructField)

DefaultClockIds will set default value for empty ClockIds fields

type ClockSpec

type ClockSpec struct {
	// the pid of target program.
	Pid int `json:"pid,omitempty"`
	// specifies the length of time offset.
	TimeOffset string `json:"time-offset,omitempty"`
	// the identifier of the particular clock on which to act.
	// More clock description in linux kernel can be found in man page of clock_getres, clock_gettime, clock_settime.
	// Muti clock ids should be split with ","
	ClockIdsSlice string `json:"clock-ids-slice,omitempty"`
}

func (*ClockSpec) DeepCopy

func (in *ClockSpec) DeepCopy() *ClockSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClockSpec.

func (*ClockSpec) DeepCopyInto

func (in *ClockSpec) DeepCopyInto(out *ClockSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConcurrencyPolicy

type ConcurrencyPolicy string
var (
	ForbidConcurrent ConcurrencyPolicy = "Forbid"
	AllowConcurrent  ConcurrencyPolicy = "Allow"
)

func (ConcurrencyPolicy) IsAllow

func (c ConcurrencyPolicy) IsAllow() bool

func (ConcurrencyPolicy) IsForbid

func (c ConcurrencyPolicy) IsForbid() bool

type ConditionalBranch

type ConditionalBranch struct {
	// Target is the name of other template, if expression is evaluated as true, this template will be spawned.
	Target string `json:"target"`
	// Expression is the expression for this conditional branch, expected type of result is boolean. If expression is empty, this branch will always be selected/the template will be spawned.
	// +optional
	Expression string `json:"expression,omitempty"`
}

func (*ConditionalBranch) DeepCopy

func (in *ConditionalBranch) DeepCopy() *ConditionalBranch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalBranch.

func (*ConditionalBranch) DeepCopyInto

func (in *ConditionalBranch) DeepCopyInto(out *ConditionalBranch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConditionalBranchStatus

type ConditionalBranchStatus struct {
	Target           string                 `json:"target"`
	EvaluationResult corev1.ConditionStatus `json:"evaluationResult"`
}

func (*ConditionalBranchStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalBranchStatus.

func (*ConditionalBranchStatus) DeepCopyInto

func (in *ConditionalBranchStatus) DeepCopyInto(out *ConditionalBranchStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConditionalBranchesStatus

type ConditionalBranchesStatus struct {
	// +optional
	Branches []ConditionalBranchStatus `json:"branches"`
	// +optional
	Context []string `json:"context"`
}

func (*ConditionalBranchesStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalBranchesStatus.

func (*ConditionalBranchesStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContainerSelector

type ContainerSelector struct {
	PodSelector `json:",inline"`

	// ContainerNames indicates list of the name of affected container.
	// If not set, all containers will be injected
	// +optional
	ContainerNames []string `json:"containerNames,omitempty"`
}

func (*ContainerSelector) DeepCopy

func (in *ContainerSelector) DeepCopy() *ContainerSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSelector.

func (*ContainerSelector) DeepCopyInto

func (in *ContainerSelector) DeepCopyInto(out *ContainerSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContainsDuration

type ContainsDuration interface {
	GetDuration() (*time.Duration, error)
}

+kubebuilder:object:generate=false

type CorruptSpec

type CorruptSpec struct {
	Corrupt string `json:"corrupt" webhook:"FloatStr"`
	// +optional
	Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"`
}

CorruptSpec defines detail of a corrupt action

func (*CorruptSpec) DeepCopy

func (in *CorruptSpec) DeepCopy() *CorruptSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorruptSpec.

func (*CorruptSpec) DeepCopyInto

func (in *CorruptSpec) DeepCopyInto(out *CorruptSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DNSChaos

type DNSChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a pod chaos experiment
	Spec DNSChaosSpec `json:"spec"`

	// +optional
	// Most recently observed status of the chaos experiment about pods
	Status DNSChaosStatus `json:"status"`
}

DNSChaos is the Schema for the networkchaos API

func (*DNSChaos) DeepCopy

func (in *DNSChaos) DeepCopy() *DNSChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaos.

func (*DNSChaos) DeepCopyInto

func (in *DNSChaos) DeepCopyInto(out *DNSChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DNSChaos) DeepCopyObject

func (in *DNSChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*DNSChaos) Default

func (in *DNSChaos) Default()

func (*DNSChaos) DurationExceeded

func (in *DNSChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*DNSChaos) GetObjectMeta

func (in *DNSChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*DNSChaos) GetSelectorSpecs

func (obj *DNSChaos) GetSelectorSpecs() map[string]interface{}

func (*DNSChaos) GetSpecAndMetaString

func (in *DNSChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*DNSChaos) GetStatus

func (in *DNSChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*DNSChaos) IsDeleted

func (in *DNSChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*DNSChaos) IsOneShot

func (in *DNSChaos) IsOneShot() bool

func (*DNSChaos) IsPaused

func (in *DNSChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*DNSChaos) Validate

func (in *DNSChaos) Validate() error

func (*DNSChaos) ValidateCreate

func (in *DNSChaos) ValidateCreate() error

func (*DNSChaos) ValidateDelete

func (in *DNSChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*DNSChaos) ValidateUpdate

func (in *DNSChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type DNSChaosAction

type DNSChaosAction string

DNSChaosAction represents the chaos action about DNS.

const (
	// ErrorAction represents get error when send DNS request.
	ErrorAction DNSChaosAction = "error"

	// RandomAction represents get random IP when send DNS request.
	RandomAction DNSChaosAction = "random"
)

type DNSChaosList

type DNSChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DNSChaos `json:"items"`
}

DNSChaosList contains a list of DNSChaos

func (*DNSChaosList) DeepCopy

func (in *DNSChaosList) DeepCopy() *DNSChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaosList.

func (*DNSChaosList) DeepCopyInto

func (in *DNSChaosList) DeepCopyInto(out *DNSChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DNSChaosList) DeepCopyList

func (in *DNSChaosList) DeepCopyList() GenericChaosList

func (*DNSChaosList) DeepCopyObject

func (in *DNSChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*DNSChaosList) GetItems

func (in *DNSChaosList) GetItems() []GenericChaos

func (*DNSChaosList) ListChaos

func (in *DNSChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type DNSChaosSpec

type DNSChaosSpec struct {
	// Action defines the specific DNS chaos action.
	// Supported action: error, random
	// Default action: error
	// +kubebuilder:validation:Enum=error;random
	Action DNSChaosAction `json:"action"`

	ContainerSelector `json:",inline"`

	// Duration represents the duration of the chaos action
	Duration *string `json:"duration,omitempty" webhook:"Duration"`

	// Choose which domain names to take effect, support the placeholder ? and wildcard *, or the Specified domain name.
	// Note:
	//      1. The wildcard * must be at the end of the string. For example, chaos-*.org is invalid.
	//      2. if the patterns is empty, will take effect on all the domain names.
	// For example:
	// 		The value is ["google.com", "github.*", "chaos-mes?.org"],
	// 		will take effect on "google.com", "github.com" and "chaos-mesh.org"
	// +optional
	DomainNamePatterns []string `json:"patterns"`
}

DNSChaosSpec defines the desired state of DNSChaos

func (*DNSChaosSpec) DeepCopy

func (in *DNSChaosSpec) DeepCopy() *DNSChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaosSpec.

func (*DNSChaosSpec) DeepCopyInto

func (in *DNSChaosSpec) DeepCopyInto(out *DNSChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DNSChaosSpec) GetDuration

func (in *DNSChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

type DNSChaosStatus

type DNSChaosStatus struct {
	ChaosStatus `json:",inline"`
}

DNSChaosStatus defines the observed state of DNSChaos

func (*DNSChaosStatus) DeepCopy

func (in *DNSChaosStatus) DeepCopy() *DNSChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaosStatus.

func (*DNSChaosStatus) DeepCopyInto

func (in *DNSChaosStatus) DeepCopyInto(out *DNSChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DelaySpec

type DelaySpec struct {
	Latency string `json:"latency" webhook:"Duration"`
	// +optional
	Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"`
	// +optional
	Jitter string `json:"jitter,omitempty" default:"0ms" webhook:"Duration"`
	// +optional
	Reorder *ReorderSpec `json:"reorder,omitempty"`
}

DelaySpec defines detail of a delay action

func (*DelaySpec) DeepCopy

func (in *DelaySpec) DeepCopy() *DelaySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DelaySpec.

func (*DelaySpec) DeepCopyInto

func (in *DelaySpec) DeepCopyInto(out *DelaySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DesiredPhase

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

type Direction

type Direction string

Direction represents traffic direction from source to target, it could be netem, delay, loss, duplicate, corrupt or partition, check comments below for detail direction flow.

const (
	// To represents network packet from source to target
	To Direction = "to"

	// From represents network packet to source from target
	From Direction = "from"

	// Both represents both directions
	Both Direction = "both"
)

func (*Direction) Default

func (in *Direction) Default(root interface{}, field *reflect.StructField)

type DiskFileSpec

type DiskFileSpec struct {
	// specifies how many units of data will write into the file path. support unit: c=1, w=2, b=512, kB=1000,
	// K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 BYTES. example : 1M | 512kB
	Size string `json:"size,omitempty"`
	// specifies the location to fill data in. if path not provided,
	// payload will read/write from/into a temp file, temp file will be deleted after writing
	Path string `json:"path,omitempty"`
}

func (*DiskFileSpec) DeepCopy

func (in *DiskFileSpec) DeepCopy() *DiskFileSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskFileSpec.

func (*DiskFileSpec) DeepCopyInto

func (in *DiskFileSpec) DeepCopyInto(out *DiskFileSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiskFillSpec

type DiskFillSpec struct {
	DiskFileSpec `json:",inline"`

	// fill disk by fallocate
	FillByFallocate bool `json:"fill-by-fallocate,omitempty"`
}

func (*DiskFillSpec) DeepCopy

func (in *DiskFillSpec) DeepCopy() *DiskFillSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskFillSpec.

func (*DiskFillSpec) DeepCopyInto

func (in *DiskFillSpec) DeepCopyInto(out *DiskFillSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiskPayloadSpec

type DiskPayloadSpec struct {
	DiskFileSpec `json:",inline"`

	// specifies the number of process work on writing, default 1, only 1-255 is valid value
	PayloadProcessNum uint8 `json:"payload-process-num,omitempty"`
}

func (*DiskPayloadSpec) DeepCopy

func (in *DiskPayloadSpec) DeepCopy() *DiskPayloadSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskPayloadSpec.

func (*DiskPayloadSpec) DeepCopyInto

func (in *DiskPayloadSpec) DeepCopyInto(out *DiskPayloadSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DuplicateSpec

type DuplicateSpec struct {
	Duplicate string `json:"duplicate" webhook:"FloatStr"`
	// +optional
	Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"`
}

DuplicateSpec defines detail of a duplicate action

func (*DuplicateSpec) DeepCopy

func (in *DuplicateSpec) DeepCopy() *DuplicateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DuplicateSpec.

func (*DuplicateSpec) DeepCopyInto

func (in *DuplicateSpec) DeepCopyInto(out *DuplicateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Duration

type Duration string

func (*Duration) Default

func (d *Duration) Default(root interface{}, field *reflect.StructField)

func (*Duration) Validate

func (d *Duration) Validate(root interface{}, path *field.Path) field.ErrorList

type EbsVolume

type EbsVolume string

func (*EbsVolume) Validate

func (in *EbsVolume) Validate(root interface{}, path *field.Path) field.ErrorList

type EmbedChaos

type EmbedChaos struct {
	// +optional
	AWSChaos *AWSChaosSpec `json:"awsChaos,omitempty"`
	// +optional
	DNSChaos *DNSChaosSpec `json:"dnsChaos,omitempty"`
	// +optional
	GCPChaos *GCPChaosSpec `json:"gcpChaos,omitempty"`
	// +optional
	HTTPChaos *HTTPChaosSpec `json:"httpChaos,omitempty"`
	// +optional
	IOChaos *IOChaosSpec `json:"ioChaos,omitempty"`
	// +optional
	JVMChaos *JVMChaosSpec `json:"jvmChaos,omitempty"`
	// +optional
	KernelChaos *KernelChaosSpec `json:"kernelChaos,omitempty"`
	// +optional
	NetworkChaos *NetworkChaosSpec `json:"networkChaos,omitempty"`
	// +optional
	PhysicalMachineChaos *PhysicalMachineChaosSpec `json:"physicalmachineChaos,omitempty"`
	// +optional
	PodChaos *PodChaosSpec `json:"podChaos,omitempty"`
	// +optional
	StressChaos *StressChaosSpec `json:"stressChaos,omitempty"`
	// +optional
	TimeChaos *TimeChaosSpec `json:"timeChaos,omitempty"`
}

func (*EmbedChaos) DeepCopy

func (in *EmbedChaos) DeepCopy() *EmbedChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbedChaos.

func (*EmbedChaos) DeepCopyInto

func (in *EmbedChaos) DeepCopyInto(out *EmbedChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EmbedChaos) RestoreChaosSpec

func (it *EmbedChaos) RestoreChaosSpec(root interface{}) error

func (*EmbedChaos) SpawnNewList

func (it *EmbedChaos) SpawnNewList(templateType TemplateType) (GenericChaosList, error)

func (*EmbedChaos) SpawnNewObject

func (it *EmbedChaos) SpawnNewObject(templateType TemplateType) (GenericChaos, error)

func (EmbedChaos) Validate

func (in EmbedChaos) Validate(path *field.Path, chaosType string) field.ErrorList

type ExpInfo

type ExpInfo struct {
	// the experiment ID
	// +optional
	UID string `json:"uid,omitempty"`

	// the subAction, generate automatically
	// +optional
	Action string `json:"action,omitempty"`

	// +optional
	StressCPU *StressCPUSpec `json:"stress-cpu,omitempty"`

	// +optional
	StressMemory *StressMemorySpec `json:"stress-mem,omitempty"`

	// +optional
	DiskReadPayload *DiskPayloadSpec `json:"disk-read-payload,omitempty"`

	// +optional
	DiskWritePayload *DiskPayloadSpec `json:"disk-write-payload,omitempty"`

	// +optional
	DiskFill *DiskFillSpec `json:"disk-fill,omitempty"`

	// +optional
	NetworkCorrupt *NetworkCorruptSpec `json:"network-corrupt,omitempty"`

	// +optional
	NetworkDuplicate *NetworkDuplicateSpec `json:"network-duplicate,omitempty"`

	// +optional
	NetworkLoss *NetworkLossSpec `json:"network-loss,omitempty"`

	// +optional
	NetworkDelay *NetworkDelaySpec `json:"network-delay,omitempty"`

	// +optional
	NetworkPartition *NetworkPartitionSpec `json:"network-partition,omitempty"`

	// +optional
	NetworkDNS *NetworkDNSSpec `json:"network-dns,omitempty"`

	// +optional
	NetworkBandwidth *NetworkBandwidthSpec `json:"network-bandwidth,omitempty"`

	// +optional
	Process *ProcessSpec `json:"process,omitempty"`

	// +optional
	JVMException *JVMExceptionSpec `json:"jvm-exception,omitempty"`

	// +optional
	JVMGC *JVMGCSpec `json:"jvm-gc,omitempty"`

	// +optional
	JVMLatency *JVMLatencySpec `json:"jvm-latency,omitempty"`

	// +optional
	JVMReturn *JVMReturnSpec `json:"jvm-return,omitempty"`

	// +optional
	JVMStress *JVMStressSpec `json:"jvm-stress,omitempty"`

	// +optional
	JVMRuleData *JVMRuleDataSpec `json:"jvm-rule-data,omitempty"`

	// +optional
	Clock *ClockSpec `json:"clock,omitempty"`
}

func (*ExpInfo) DeepCopy

func (in *ExpInfo) DeepCopy() *ExpInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExpInfo.

func (*ExpInfo) DeepCopyInto

func (in *ExpInfo) DeepCopyInto(out *ExpInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExperimentStatus

type ExperimentStatus struct {
	// +kubebuilder:validation:Enum=Run;Stop
	DesiredPhase `json:"desiredPhase,omitempty"`
	// +optional
	// Records are used to track the running status
	Records []*Record `json:"containerRecords,omitempty"`
}

func (*ExperimentStatus) DeepCopy

func (in *ExperimentStatus) DeepCopy() *ExperimentStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentStatus.

func (*ExperimentStatus) DeepCopyInto

func (in *ExperimentStatus) DeepCopyInto(out *ExperimentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FailKernRequest

type FailKernRequest struct {
	// FailType indicates what to fail, can be set to '0' / '1' / '2'
	// If `0`, indicates slab to fail (should_failslab)
	// If `1`, indicates alloc_page to fail (should_fail_alloc_page)
	// If `2`, indicates bio to fail (should_fail_bio)
	// You can read:
	//   1. https://www.kernel.org/doc/html/latest/fault-injection/fault-injection.html
	//   2. http://github.com/iovisor/bcc/blob/master/tools/inject_example.txt
	// to learn more
	// +kubebuilder:validation:Maximum=2
	// +kubebuilder:validation:Minimum=0
	FailType int32 `json:"failtype"`

	// Headers indicates the appropriate kernel headers you need.
	// Eg: "linux/mmzone.h", "linux/blkdev.h" and so on
	Headers []string `json:"headers,omitempty"`

	// Callchain indicate a special call chain, such as:
	//     ext4_mount
	//       -> mount_subtree
	//          -> ...
	//             -> should_failslab
	// With an optional set of predicates and an optional set of
	// parameters, which used with predicates. You can read call chan
	// and predicate examples from https://gitee.com/xk39/bpfki/tree/develop/examples
	// to learn more.
	// If no special call chain, just keep Callchain empty, which means it will fail at any call chain
	// with slab alloc (eg: kmalloc).
	Callchain []Frame `json:"callchain,omitempty"`

	// Probability indicates the fails with probability.
	// If you want 1%, please set this field with 1.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	Probability uint32 `json:"probability,omitempty"`

	// Times indicates the max times of fails.
	// +kubebuilder:validation:Minimum=0
	Times uint32 `json:"times,omitempty"`
}

FailKernRequest defines the injection conditions

func (*FailKernRequest) DeepCopy

func (in *FailKernRequest) DeepCopy() *FailKernRequest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailKernRequest.

func (*FailKernRequest) DeepCopyInto

func (in *FailKernRequest) DeepCopyInto(out *FailKernRequest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FileType

type FileType string

FileType represents type of a file

const (
	NamedPipe   FileType = "namedPipe"
	CharDevice  FileType = "charDevice"
	BlockDevice FileType = "blockDevice"
	Directory   FileType = "directory"
	RegularFile FileType = "regularFile"
	TSymlink    FileType = "symlink"
	Socket      FileType = "socket"
)

type FillingType

type FillingType string

FillingType represents type of data is filled for incorrectness

const (
	// All zero
	Zero FillingType = "zero"

	// Random octets
	Random FillingType = "random"
)

type Filter

type Filter struct {
	// Path represents a glob of injecting path
	Path string `json:"path"`

	// Methods represents the method that the action will inject in
	// +optional
	Methods []IoMethod `json:"methods,omitempty"`

	// Percent represents the percent probability of injecting this action
	Percent int `json:"percent"`
}

Filter represents a filter of IOChaos action, which will define the scope of an IOChaosAction

func (*Filter) DeepCopy

func (in *Filter) DeepCopy() *Filter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.

func (*Filter) DeepCopyInto

func (in *Filter) DeepCopyInto(out *Filter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FloatStr

type FloatStr string

func (*FloatStr) Default

func (f *FloatStr) Default(root interface{}, field *reflect.StructField)

func (*FloatStr) Validate

func (f *FloatStr) Validate(root interface{}, path *field.Path) field.ErrorList

type Frame

type Frame struct {
	// Funcname can be find from kernel source or `/proc/kallsyms`, such as `ext4_mount`
	Funcname string `json:"funcname,omitempty"`

	// Parameters is used with predicate, for example, if you want to inject slab error
	// in `d_alloc_parallel(struct dentry *parent, const struct qstr *name)` with a special
	// name `bananas`, you need to set it to `struct dentry *parent, const struct qstr *name`
	// otherwise omit it.
	Parameters string `json:"parameters,omitempty"`

	// Predicate will access the arguments of this Frame, example with Parameters's, you can
	// set it to `STRNCMP(name->name, "bananas", 8)` to make inject only with it, or omit it
	// to inject for all d_alloc_parallel call chain.
	Predicate string `json:"predicate,omitempty"`
}

Frame defines the function signature and predicate in function's body

func (*Frame) DeepCopy

func (in *Frame) DeepCopy() *Frame

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Frame.

func (*Frame) DeepCopyInto

func (in *Frame) DeepCopyInto(out *Frame)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GCPChaos

type GCPChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GCPChaosSpec   `json:"spec"`
	Status GCPChaosStatus `json:"status,omitempty"`
}

GCPChaos is the Schema for the gcpchaos API

func (*GCPChaos) DeepCopy

func (in *GCPChaos) DeepCopy() *GCPChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPChaos.

func (*GCPChaos) DeepCopyInto

func (in *GCPChaos) DeepCopyInto(out *GCPChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GCPChaos) DeepCopyObject

func (in *GCPChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPChaos) Default

func (in *GCPChaos) Default()

func (*GCPChaos) DurationExceeded

func (in *GCPChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*GCPChaos) GetCustomStatus

func (obj *GCPChaos) GetCustomStatus() interface{}

func (*GCPChaos) GetObjectMeta

func (in *GCPChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*GCPChaos) GetSelectorSpecs

func (obj *GCPChaos) GetSelectorSpecs() map[string]interface{}

func (*GCPChaos) GetSpecAndMetaString

func (in *GCPChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*GCPChaos) GetStatus

func (in *GCPChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*GCPChaos) IsDeleted

func (in *GCPChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*GCPChaos) IsOneShot

func (in *GCPChaos) IsOneShot() bool

func (*GCPChaos) IsPaused

func (in *GCPChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*GCPChaos) Validate

func (in *GCPChaos) Validate() error

func (*GCPChaos) ValidateCreate

func (in *GCPChaos) ValidateCreate() error

func (*GCPChaos) ValidateDelete

func (in *GCPChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*GCPChaos) ValidateUpdate

func (in *GCPChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type GCPChaosAction

type GCPChaosAction string

GCPChaosAction represents the chaos action about gcp.

const (
	// NodeStop represents the chaos action of stopping the node.
	NodeStop GCPChaosAction = "node-stop"
	// NodeReset represents the chaos action of resetting the node.
	NodeReset GCPChaosAction = "node-reset"
	// DiskLoss represents the chaos action of detaching the disk.
	DiskLoss GCPChaosAction = "disk-loss"
)

func (GCPChaosAction) Validate

func (in GCPChaosAction) Validate(root interface{}, path *field.Path) field.ErrorList

validateDeviceName validates the DeviceName

type GCPChaosList

type GCPChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GCPChaos `json:"items"`
}

GCPChaosList contains a list of GCPChaos

func (*GCPChaosList) DeepCopy

func (in *GCPChaosList) DeepCopy() *GCPChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPChaosList.

func (*GCPChaosList) DeepCopyInto

func (in *GCPChaosList) DeepCopyInto(out *GCPChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GCPChaosList) DeepCopyList

func (in *GCPChaosList) DeepCopyList() GenericChaosList

func (*GCPChaosList) DeepCopyObject

func (in *GCPChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*GCPChaosList) GetItems

func (in *GCPChaosList) GetItems() []GenericChaos

func (*GCPChaosList) ListChaos

func (in *GCPChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type GCPChaosSpec

type GCPChaosSpec struct {
	// Action defines the specific gcp chaos action.
	// Supported action: node-stop / node-reset / disk-loss
	// Default action: node-stop
	// +kubebuilder:validation:Enum=node-stop;node-reset;disk-loss
	Action GCPChaosAction `json:"action"`

	// Duration represents the duration of the chaos action.
	// +optional
	Duration *string `json:"duration,omitempty" webhook:"Duration"`

	// SecretName defines the name of kubernetes secret. It is used for GCP credentials.
	// +optional
	SecretName *string `json:"secretName,omitempty"`

	GCPSelector `json:",inline"`
}

GCPChaosSpec is the content of the specification for a GCPChaos

func (*GCPChaosSpec) DeepCopy

func (in *GCPChaosSpec) DeepCopy() *GCPChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPChaosSpec.

func (*GCPChaosSpec) DeepCopyInto

func (in *GCPChaosSpec) DeepCopyInto(out *GCPChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GCPChaosSpec) GetDuration

func (in *GCPChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

type GCPChaosStatus

type GCPChaosStatus struct {
	ChaosStatus `json:",inline"`

	// The attached disk info strings.
	// Needed in disk-loss.
	AttachedDisksStrings []string `json:"attachedDiskStrings,omitempty"`
}

GCPChaosStatus represents the status of a GCPChaos

func (*GCPChaosStatus) DeepCopy

func (in *GCPChaosStatus) DeepCopy() *GCPChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPChaosStatus.

func (*GCPChaosStatus) DeepCopyInto

func (in *GCPChaosStatus) DeepCopyInto(out *GCPChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GCPDeviceNames

type GCPDeviceNames []string

func (GCPDeviceNames) DeepCopy

func (in GCPDeviceNames) DeepCopy() GCPDeviceNames

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPDeviceNames.

func (GCPDeviceNames) DeepCopyInto

func (in GCPDeviceNames) DeepCopyInto(out *GCPDeviceNames)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GCPDeviceNames) Validate

func (in *GCPDeviceNames) Validate(root interface{}, path *field.Path) field.ErrorList

validateDeviceName validates the DeviceName

type GCPSelector

type GCPSelector struct {
	// Project defines the name of gcp project.
	Project string `json:"project"`

	// Zone defines the zone of gcp project.
	Zone string `json:"zone"`

	// Instance defines the name of the instance
	Instance string `json:"instance"`

	// The device name of disks to detach.
	// Needed in disk-loss.
	// +optional
	DeviceNames []string `json:"deviceNames,omitempty" webhook:"GCPDeviceNames,nilable"`
}

func (*GCPSelector) DeepCopy

func (in *GCPSelector) DeepCopy() *GCPSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPSelector.

func (*GCPSelector) DeepCopyInto

func (in *GCPSelector) DeepCopyInto(out *GCPSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GCPSelector) Id

func (selector *GCPSelector) Id() string

type GenericChaos

type GenericChaos interface {
	runtime.Object
	metav1.Object
}

GenericChaos could be a place holder for any kubernetes Kind +kubebuilder:object:generate=false

type GenericChaosList

type GenericChaosList interface {
	runtime.Object
	metav1.ListInterface
	GetItems() []GenericChaos
	DeepCopyList() GenericChaosList
}

GenericChaosList only use to list GenericChaos by certain EmbedChaos +kubebuilder:object:generate=false

type GenericSelectorSpec

type GenericSelectorSpec struct {
	// Namespaces is a set of namespace to which objects belong.
	// +optional
	Namespaces []string `json:"namespaces,omitempty"`

	// Map of string keys and values that can be used to select objects.
	// A selector based on fields.
	// +optional
	FieldSelectors map[string]string `json:"fieldSelectors,omitempty"`

	// Map of string keys and values that can be used to select objects.
	// A selector based on labels.
	// +optional
	LabelSelectors map[string]string `json:"labelSelectors,omitempty"`

	// a slice of label selector expressions that can be used to select objects.
	// A list of selectors based on set-based label expressions.
	// +optional
	ExpressionSelectors LabelSelectorRequirements `json:"expressionSelectors,omitempty"`

	// Map of string keys and values that can be used to select objects.
	// A selector based on annotations.
	// +optional
	AnnotationSelectors map[string]string `json:"annotationSelectors,omitempty"`
}

GenericSelectorSpec defines some selectors to select objects.

func (*GenericSelectorSpec) DeepCopy

func (in *GenericSelectorSpec) DeepCopy() *GenericSelectorSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericSelectorSpec.

func (*GenericSelectorSpec) DeepCopyInto

func (in *GenericSelectorSpec) DeepCopyInto(out *GenericSelectorSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPChaos

type HTTPChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   HTTPChaosSpec   `json:"spec,omitempty"`
	Status HTTPChaosStatus `json:"status,omitempty"`
}

HTTPChaos is the Schema for the HTTPchaos API

func (*HTTPChaos) DeepCopy

func (in *HTTPChaos) DeepCopy() *HTTPChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaos.

func (*HTTPChaos) DeepCopyInto

func (in *HTTPChaos) DeepCopyInto(out *HTTPChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPChaos) DeepCopyObject

func (in *HTTPChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*HTTPChaos) Default

func (in *HTTPChaos) Default()

func (*HTTPChaos) DurationExceeded

func (in *HTTPChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*HTTPChaos) GetCustomStatus

func (obj *HTTPChaos) GetCustomStatus() interface{}

func (*HTTPChaos) GetObjectMeta

func (in *HTTPChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*HTTPChaos) GetSelectorSpecs

func (obj *HTTPChaos) GetSelectorSpecs() map[string]interface{}

func (*HTTPChaos) GetSpecAndMetaString

func (in *HTTPChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*HTTPChaos) GetStatus

func (in *HTTPChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*HTTPChaos) IsDeleted

func (in *HTTPChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*HTTPChaos) IsOneShot

func (in *HTTPChaos) IsOneShot() bool

func (*HTTPChaos) IsPaused

func (in *HTTPChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*HTTPChaos) Validate

func (in *HTTPChaos) Validate() error

func (*HTTPChaos) ValidateCreate

func (in *HTTPChaos) ValidateCreate() error

func (*HTTPChaos) ValidateDelete

func (in *HTTPChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*HTTPChaos) ValidateUpdate

func (in *HTTPChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type HTTPChaosList

type HTTPChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []HTTPChaos `json:"items"`
}

HTTPChaosList contains a list of HTTPChaos

func (*HTTPChaosList) DeepCopy

func (in *HTTPChaosList) DeepCopy() *HTTPChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaosList.

func (*HTTPChaosList) DeepCopyInto

func (in *HTTPChaosList) DeepCopyInto(out *HTTPChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPChaosList) DeepCopyList

func (in *HTTPChaosList) DeepCopyList() GenericChaosList

func (*HTTPChaosList) DeepCopyObject

func (in *HTTPChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*HTTPChaosList) GetItems

func (in *HTTPChaosList) GetItems() []GenericChaos

func (*HTTPChaosList) ListChaos

func (in *HTTPChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type HTTPChaosSpec

type HTTPChaosSpec struct {
	PodSelector `json:",inline"`

	// +kubebuilder:validation:Enum=Request;Response
	// Target is the object to be selected and injected.
	Target PodHttpChaosTarget `json:"target"`

	PodHttpChaosActions `json:",inline"`

	// Port represents the target port to be proxy of.
	Port int32 `json:"port,omitempty" webhook:"Port"`

	// Path is a rule to select target by uri path in http request.
	// +optional
	Path *string `json:"path,omitempty"`

	// Method is a rule to select target by http method in request.
	// +optional
	Method *string `json:"method,omitempty" webhook:"HTTPMethod"`

	// Code is a rule to select target by http status code in response.
	// +optional
	Code *int32 `json:"code,omitempty"`

	// RequestHeaders is a rule to select target by http headers in request.
	// The key-value pairs represent header name and header value pairs.
	// +optional
	RequestHeaders map[string]string `json:"request_headers,omitempty"`

	// ResponseHeaders is a rule to select target by http headers in response.
	// The key-value pairs represent header name and header value pairs.
	// +optional
	ResponseHeaders map[string]string `json:"response_headers,omitempty"`

	// Duration represents the duration of the chaos action.
	// +optional
	Duration *string `json:"duration,omitempty" webhook:"Duration"`
}

func (*HTTPChaosSpec) DeepCopy

func (in *HTTPChaosSpec) DeepCopy() *HTTPChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaosSpec.

func (*HTTPChaosSpec) DeepCopyInto

func (in *HTTPChaosSpec) DeepCopyInto(out *HTTPChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPChaosSpec) GetDuration

func (in *HTTPChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

type HTTPChaosStatus

type HTTPChaosStatus struct {
	ChaosStatus `json:",inline"`

	// Instances always specifies podhttpchaos generation or empty
	// +optional
	Instances map[string]int64 `json:"instances,omitempty"`
}

func (*HTTPChaosStatus) DeepCopy

func (in *HTTPChaosStatus) DeepCopy() *HTTPChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaosStatus.

func (*HTTPChaosStatus) DeepCopyInto

func (in *HTTPChaosStatus) DeepCopyInto(out *HTTPChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPMethod

type HTTPMethod string

func (*HTTPMethod) Validate

func (in *HTTPMethod) Validate(root interface{}, path *field.Path) field.ErrorList

type IOChaos

type IOChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   IOChaosSpec   `json:"spec,omitempty"`
	Status IOChaosStatus `json:"status,omitempty"`
}

IOChaos is the Schema for the iochaos API

func (*IOChaos) DeepCopy

func (in *IOChaos) DeepCopy() *IOChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaos.

func (*IOChaos) DeepCopyInto

func (in *IOChaos) DeepCopyInto(out *IOChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IOChaos) DeepCopyObject

func (in *IOChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*IOChaos) Default

func (in *IOChaos) Default()

func (*IOChaos) DurationExceeded

func (in *IOChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*IOChaos) GetCustomStatus

func (obj *IOChaos) GetCustomStatus() interface{}

func (*IOChaos) GetObjectMeta

func (in *IOChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*IOChaos) GetSelectorSpecs

func (obj *IOChaos) GetSelectorSpecs() map[string]interface{}

func (*IOChaos) GetSpecAndMetaString

func (in *IOChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*IOChaos) GetStatus

func (in *IOChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*IOChaos) IsDeleted

func (in *IOChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*IOChaos) IsOneShot

func (in *IOChaos) IsOneShot() bool

func (*IOChaos) IsPaused

func (in *IOChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*IOChaos) Validate

func (in *IOChaos) Validate() error

func (*IOChaos) ValidateCreate

func (in *IOChaos) ValidateCreate() error

func (*IOChaos) ValidateDelete

func (in *IOChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*IOChaos) ValidateUpdate

func (in *IOChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type IOChaosAction

type IOChaosAction struct {
	Type IOChaosType `json:"type"`

	Filter `json:",inline"`

	// Faults represents the fault to inject
	// +optional
	Faults []IoFault `json:"faults,omitempty"`

	// Latency represents the latency to inject
	// +optional
	Latency string `json:"latency,omitempty"`

	// AttrOverride represents the attribution to override
	// +optional
	*AttrOverrideSpec `json:",inline"`

	// MistakeSpec represents the mistake to inject
	// +optional
	*MistakeSpec `json:"mistake,omitempty"`

	// Source represents the source of current rules
	Source string `json:"source,omitempty"`
}

IOChaosAction defines an possible action of IOChaos

func (*IOChaosAction) DeepCopy

func (in *IOChaosAction) DeepCopy() *IOChaosAction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaosAction.

func (*IOChaosAction) DeepCopyInto

func (in *IOChaosAction) DeepCopyInto(out *IOChaosAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IOChaosList

type IOChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []IOChaos `json:"items"`
}

IOChaosList contains a list of IOChaos

func (*IOChaosList) DeepCopy

func (in *IOChaosList) DeepCopy() *IOChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaosList.

func (*IOChaosList) DeepCopyInto

func (in *IOChaosList) DeepCopyInto(out *IOChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IOChaosList) DeepCopyList

func (in *IOChaosList) DeepCopyList() GenericChaosList

func (*IOChaosList) DeepCopyObject

func (in *IOChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*IOChaosList) GetItems

func (in *IOChaosList) GetItems() []GenericChaos

func (*IOChaosList) ListChaos

func (in *IOChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type IOChaosSpec

type IOChaosSpec struct {
	ContainerSelector `json:",inline"`

	// Action defines the specific pod chaos action.
	// Supported action: latency / fault / attrOverride / mistake
	// +kubebuilder:validation:Enum=latency;fault;attrOverride;mistake
	Action IOChaosType `json:"action"`

	// Delay defines the value of I/O chaos action delay.
	// A delay string is a possibly signed sequence of
	// decimal numbers, each with optional fraction and a unit suffix,
	// such as "300ms".
	// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
	// +optional
	Delay string `json:"delay,omitempty" webhook:"Duration"`

	// Errno defines the error code that returned by I/O action.
	// refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html
	// +optional
	Errno uint32 `json:"errno,omitempty" webhook:"IOErrno"`

	// Attr defines the overrided attribution
	// +optional
	Attr *AttrOverrideSpec `json:"attr,omitempty"`

	// Mistake defines what types of incorrectness are injected to IO operations
	// +optional
	Mistake *MistakeSpec `json:"mistake,omitempty"`

	// Path defines the path of files for injecting I/O chaos action.
	// +optional
	Path string `json:"path,omitempty"`

	// Methods defines the I/O methods for injecting I/O chaos action.
	// default: all I/O methods.
	// +optional
	Methods []IoMethod `json:"methods,omitempty" faker:"ioMethods"`

	// Percent defines the percentage of injection errors and provides a number from 0-100.
	// default: 100.
	// +optional
	Percent int `json:"percent,omitempty" webhook:"Percent"`

	// VolumePath represents the mount path of injected volume
	VolumePath string `json:"volumePath"`

	// Duration represents the duration of the chaos action.
	// It is required when the action is `PodFailureAction`.
	// A duration string is a possibly signed sequence of
	// decimal numbers, each with optional fraction and a unit suffix,
	// such as "300ms", "-1.5h" or "2h45m".
	// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
	// +optional
	Duration *string `json:"duration,omitempty" webhook:"Duration"`
}

IOChaosSpec defines the desired state of IOChaos

func (*IOChaosSpec) DeepCopy

func (in *IOChaosSpec) DeepCopy() *IOChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaosSpec.

func (*IOChaosSpec) DeepCopyInto

func (in *IOChaosSpec) DeepCopyInto(out *IOChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IOChaosSpec) GetDuration

func (in *IOChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

type IOChaosStatus

type IOChaosStatus struct {
	ChaosStatus `json:",inline"`

	// Instances always specifies podiochaos generation or empty
	// +optional
	Instances map[string]int64 `json:"instances,omitempty"`
}

IOChaosStatus defines the observed state of IOChaos

func (*IOChaosStatus) DeepCopy

func (in *IOChaosStatus) DeepCopy() *IOChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaosStatus.

func (*IOChaosStatus) DeepCopyInto

func (in *IOChaosStatus) DeepCopyInto(out *IOChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IOChaosType

type IOChaosType string

IOChaosType represents the type of an IOChaos Action

const (
	// IoLatency represents injecting latency for io operation
	IoLatency IOChaosType = "latency"

	// IoFaults represents injecting faults for io operation
	IoFaults IOChaosType = "fault"

	// IoAttrOverride represents replacing attribution for io operation
	IoAttrOverride IOChaosType = "attrOverride"

	// IoMistake represents injecting incorrect read or write for io operation
	IoMistake IOChaosType = "mistake"
)

type IOErrno

type IOErrno uint32

func (*IOErrno) Validate

func (in *IOErrno) Validate(root interface{}, path *field.Path) field.ErrorList

type InnerObject

type InnerObject interface {
	StatefulObject
	IsDeleted() bool
	IsPaused() bool
	DurationExceeded(time.Time) (bool, time.Duration, error)
	IsOneShot() bool
}

InnerObject is basic Object for the Reconciler

type InnerObjectWithCustomStatus

type InnerObjectWithCustomStatus interface {
	InnerObject

	GetCustomStatus() interface{}
}

+kubebuilder:object:generate=false

type InnerObjectWithSelector

type InnerObjectWithSelector interface {
	InnerObject

	GetSelectorSpecs() map[string]interface{}
}

+kubebuilder:object:generate=false

type IoFault

type IoFault struct {
	Errno  uint32 `json:"errno"`
	Weight int32  `json:"weight"`
}

IoFault represents the fault to inject and their weight

func (*IoFault) DeepCopy

func (in *IoFault) DeepCopy() *IoFault

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IoFault.

func (*IoFault) DeepCopyInto

func (in *IoFault) DeepCopyInto(out *IoFault)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IoMethod

type IoMethod string
const (
	LookUp      IoMethod = "lookup"
	Forget      IoMethod = "forget"
	GetAttr     IoMethod = "getattr"
	SetAttr     IoMethod = "setattr"
	ReadLink    IoMethod = "readlink"
	Mknod       IoMethod = "mknod"
	Mkdir       IoMethod = "mkdir"
	UnLink      IoMethod = "unlink"
	Rmdir       IoMethod = "rmdir"
	MSymlink    IoMethod = "symlink"
	Rename      IoMethod = "rename"
	Link        IoMethod = "link"
	Open        IoMethod = "open"
	Read        IoMethod = "read"
	Write       IoMethod = "write"
	Flush       IoMethod = "flush"
	Release     IoMethod = "release"
	Fsync       IoMethod = "fsync"
	Opendir     IoMethod = "opendir"
	Readdir     IoMethod = "readdir"
	Releasedir  IoMethod = "releasedir"
	Fsyncdir    IoMethod = "fsyncdir"
	Statfs      IoMethod = "statfs"
	SetXAttr    IoMethod = "setxattr"
	GetXAttr    IoMethod = "getxattr"
	ListXAttr   IoMethod = "listxattr"
	RemoveXAttr IoMethod = "removexattr"
	Access      IoMethod = "access"
	Create      IoMethod = "create"
	GetLk       IoMethod = "getlk"
	SetLk       IoMethod = "setlk"
	Bmap        IoMethod = "bmap"
)

type JVMChaos

type JVMChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   JVMChaosSpec   `json:"spec,omitempty"`
	Status JVMChaosStatus `json:"status,omitempty"`
}

JVMChaos is the Schema for the jvmchaos API

func (*JVMChaos) DeepCopy

func (in *JVMChaos) DeepCopy() *JVMChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaos.

func (*JVMChaos) DeepCopyInto

func (in *JVMChaos) DeepCopyInto(out *JVMChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JVMChaos) DeepCopyObject

func (in *JVMChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*JVMChaos) Default

func (in *JVMChaos) Default()

func (*JVMChaos) DurationExceeded

func (in *JVMChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*JVMChaos) GetObjectMeta

func (in *JVMChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*JVMChaos) GetSelectorSpecs

func (obj *JVMChaos) GetSelectorSpecs() map[string]interface{}

func (*JVMChaos) GetSpecAndMetaString

func (in *JVMChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*JVMChaos) GetStatus

func (in *JVMChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*JVMChaos) IsDeleted

func (in *JVMChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*JVMChaos) IsOneShot

func (in *JVMChaos) IsOneShot() bool

func (*JVMChaos) IsPaused

func (in *JVMChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*JVMChaos) Validate

func (in *JVMChaos) Validate() error

func (*JVMChaos) ValidateCreate

func (in *JVMChaos) ValidateCreate() error

func (*JVMChaos) ValidateDelete

func (in *JVMChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*JVMChaos) ValidateUpdate

func (in *JVMChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type JVMChaosAction

type JVMChaosAction string

JVMChaosAction represents the chaos action about jvm

const (
	// JVMLatencyAction represents the JVM chaos action of invoke latency
	JVMLatencyAction JVMChaosAction = "latency"

	// JVMReturnAction represents the JVM chaos action of return value
	JVMReturnAction JVMChaosAction = "return"

	// JVMExceptionAction represents the JVM chaos action of throwing custom exceptions
	JVMExceptionAction JVMChaosAction = "exception"

	// JVMStressAction represents the JVM chaos action of stress like CPU and memory
	JVMStressAction JVMChaosAction = "stress"

	// JVMGCAction represents the JVM chaos action of trigger garbage collection
	JVMGCAction JVMChaosAction = "gc"

	// JVMRuleDataAction represents inject fault with byteman's rule
	// refer to https://downloads.jboss.org/byteman/4.0.14/byteman-programmers-guide.html#the-byteman-rule-language
	JVMRuleDataAction JVMChaosAction = "ruleData"
)

type JVMChaosList

type JVMChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []JVMChaos `json:"items"`
}

JVMChaosList contains a list of JVMChaos

func (*JVMChaosList) DeepCopy

func (in *JVMChaosList) DeepCopy() *JVMChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaosList.

func (*JVMChaosList) DeepCopyInto

func (in *JVMChaosList) DeepCopyInto(out *JVMChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JVMChaosList) DeepCopyList

func (in *JVMChaosList) DeepCopyList() GenericChaosList

func (*JVMChaosList) DeepCopyObject

func (in *JVMChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*JVMChaosList) GetItems

func (in *JVMChaosList) GetItems() []GenericChaos

func (*JVMChaosList) ListChaos

func (in *JVMChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type JVMChaosSpec

type JVMChaosSpec struct {
	ContainerSelector `json:",inline"`

	// Duration represents the duration of the chaos action
	// +optional
	Duration *string `json:"duration,omitempty" webhook:"Duration"`

	// Action defines the specific jvm chaos action.
	// Supported action: latency;return;exception;stress;gc;ruleData
	// +kubebuilder:validation:Enum=latency;return;exception;stress;gc;ruleData
	Action JVMChaosAction `json:"action"`

	// JVMParameter represents the detail about jvm chaos action definition
	// +optional
	JVMParameter `json:",inline"`
}

JVMChaosSpec defines the desired state of JVMChaos

func (*JVMChaosSpec) DeepCopy

func (in *JVMChaosSpec) DeepCopy() *JVMChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaosSpec.

func (*JVMChaosSpec) DeepCopyInto

func (in *JVMChaosSpec) DeepCopyInto(out *JVMChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JVMChaosSpec) Default

func (in *JVMChaosSpec) Default(root interface{}, field *reflect.StructField)

func (*JVMChaosSpec) GetDuration

func (in *JVMChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

func (*JVMChaosSpec) Validate

func (in *JVMChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList

type JVMChaosStatus

type JVMChaosStatus struct {
	ChaosStatus `json:",inline"`
}

JVMChaosStatus defines the observed state of JVMChaos

func (*JVMChaosStatus) DeepCopy

func (in *JVMChaosStatus) DeepCopy() *JVMChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaosStatus.

func (*JVMChaosStatus) DeepCopyInto

func (in *JVMChaosStatus) DeepCopyInto(out *JVMChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMClassMethodSpec

type JVMClassMethodSpec struct {
	// Java class
	Class string `json:"class,omitempty"`

	// the method in Java class
	Method string `json:"method,omitempty"`
}

func (*JVMClassMethodSpec) DeepCopy

func (in *JVMClassMethodSpec) DeepCopy() *JVMClassMethodSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMClassMethodSpec.

func (*JVMClassMethodSpec) DeepCopyInto

func (in *JVMClassMethodSpec) DeepCopyInto(out *JVMClassMethodSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMCommonSpec

type JVMCommonSpec struct {
	// the port of agent server
	Port int `json:"port,omitempty"`

	// the pid of Java process which need to attach
	Pid int `json:"pid,omitempty"`
}

func (*JVMCommonSpec) DeepCopy

func (in *JVMCommonSpec) DeepCopy() *JVMCommonSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMCommonSpec.

func (*JVMCommonSpec) DeepCopyInto

func (in *JVMCommonSpec) DeepCopyInto(out *JVMCommonSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMExceptionSpec

type JVMExceptionSpec struct {
	JVMCommonSpec      `json:",inline"`
	JVMClassMethodSpec `json:",inline"`

	// the exception which needs to throw for action `exception`
	ThrowException string `json:"exception,omitempty"`
}

func (*JVMExceptionSpec) DeepCopy

func (in *JVMExceptionSpec) DeepCopy() *JVMExceptionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMExceptionSpec.

func (*JVMExceptionSpec) DeepCopyInto

func (in *JVMExceptionSpec) DeepCopyInto(out *JVMExceptionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMGCSpec

type JVMGCSpec struct {
	JVMCommonSpec `json:",inline"`
}

func (*JVMGCSpec) DeepCopy

func (in *JVMGCSpec) DeepCopy() *JVMGCSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMGCSpec.

func (*JVMGCSpec) DeepCopyInto

func (in *JVMGCSpec) DeepCopyInto(out *JVMGCSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMLatencySpec

type JVMLatencySpec struct {
	JVMCommonSpec      `json:",inline"`
	JVMClassMethodSpec `json:",inline"`

	// the latency duration for action 'latency', unit ms
	LatencyDuration int `json:"latency,omitempty"`
}

func (*JVMLatencySpec) DeepCopy

func (in *JVMLatencySpec) DeepCopy() *JVMLatencySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMLatencySpec.

func (*JVMLatencySpec) DeepCopyInto

func (in *JVMLatencySpec) DeepCopyInto(out *JVMLatencySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMParameter

type JVMParameter struct {
	// +optional
	// byteman rule name, should be unique, and will use JVMChaos' name if not set
	Name string `json:"name"`

	// +optional
	// Java class
	Class string `json:"class"`

	// +optional
	// the method in Java class
	Method string `json:"method"`

	// +optional
	// the return value for action 'return'
	ReturnValue string `json:"value"`

	// +optional
	// the exception which needs to throw for action `exception`
	ThrowException string `json:"exception"`

	// +optional
	// the latency duration for action 'latency', unit ms
	LatencyDuration int `json:"latency"`

	// +optional
	// the CPU core number need to use, only set it when action is stress
	CPUCount int `json:"cpuCount"`

	// +optional
	// the memory type need to locate, only set it when action is stress, the value can be 'stack' or 'heap'
	MemoryType string `json:"memType"`

	// +optional
	// the port of agent server, default 9277
	Port int32 `json:"port"`

	// +optional
	RuleData string `json:"ruleData"`
}

JVMParameter represents the detail about jvm chaos action definition

func (*JVMParameter) DeepCopy

func (in *JVMParameter) DeepCopy() *JVMParameter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMParameter.

func (*JVMParameter) DeepCopyInto

func (in *JVMParameter) DeepCopyInto(out *JVMParameter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMReturnSpec

type JVMReturnSpec struct {
	JVMCommonSpec      `json:",inline"`
	JVMClassMethodSpec `json:",inline"`

	// the return value for action 'return'
	ReturnValue string `json:"value,omitempty"`
}

func (*JVMReturnSpec) DeepCopy

func (in *JVMReturnSpec) DeepCopy() *JVMReturnSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMReturnSpec.

func (*JVMReturnSpec) DeepCopyInto

func (in *JVMReturnSpec) DeepCopyInto(out *JVMReturnSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMRuleDataSpec

type JVMRuleDataSpec struct {
	JVMCommonSpec `json:",inline"`

	// RuleData used to save the rule file's data, will use it when recover
	RuleData string `json:"rule-data,omitempty"`
}

func (*JVMRuleDataSpec) DeepCopy

func (in *JVMRuleDataSpec) DeepCopy() *JVMRuleDataSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMRuleDataSpec.

func (*JVMRuleDataSpec) DeepCopyInto

func (in *JVMRuleDataSpec) DeepCopyInto(out *JVMRuleDataSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMStressSpec

type JVMStressSpec struct {
	JVMCommonSpec `json:",inline"`

	// the CPU core number need to use, only set it when action is stress
	CPUCount int `json:"cpu-count,omitempty"`

	// the memory type need to locate, only set it when action is stress, the value can be 'stack' or 'heap'
	MemoryType string `json:"mem-type,omitempty"`
}

func (*JVMStressSpec) DeepCopy

func (in *JVMStressSpec) DeepCopy() *JVMStressSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMStressSpec.

func (*JVMStressSpec) DeepCopyInto

func (in *JVMStressSpec) DeepCopyInto(out *JVMStressSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KernelChaos

type KernelChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a kernel chaos experiment
	Spec KernelChaosSpec `json:"spec"`

	// +optional
	// Most recently observed status of the kernel chaos experiment
	Status KernelChaosStatus `json:"status"`
}

KernelChaos is the Schema for the kernelchaos API

func (*KernelChaos) DeepCopy

func (in *KernelChaos) DeepCopy() *KernelChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelChaos.

func (*KernelChaos) DeepCopyInto

func (in *KernelChaos) DeepCopyInto(out *KernelChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KernelChaos) DeepCopyObject

func (in *KernelChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*KernelChaos) Default

func (in *KernelChaos) Default()

func (*KernelChaos) DurationExceeded

func (in *KernelChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*KernelChaos) GetObjectMeta

func (in *KernelChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*KernelChaos) GetSelectorSpecs

func (obj *KernelChaos) GetSelectorSpecs() map[string]interface{}

func (*KernelChaos) GetSpecAndMetaString

func (in *KernelChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*KernelChaos) GetStatus

func (in *KernelChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*KernelChaos) IsDeleted

func (in *KernelChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*KernelChaos) IsOneShot

func (in *KernelChaos) IsOneShot() bool

func (*KernelChaos) IsPaused

func (in *KernelChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*KernelChaos) Validate

func (in *KernelChaos) Validate() error

func (*KernelChaos) ValidateCreate

func (in *KernelChaos) ValidateCreate() error

func (*KernelChaos) ValidateDelete

func (in *KernelChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*KernelChaos) ValidateUpdate

func (in *KernelChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type KernelChaosList

type KernelChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []KernelChaos `json:"items"`
}

KernelChaosList contains a list of KernelChaos

func (*KernelChaosList) DeepCopy

func (in *KernelChaosList) DeepCopy() *KernelChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelChaosList.

func (*KernelChaosList) DeepCopyInto

func (in *KernelChaosList) DeepCopyInto(out *KernelChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KernelChaosList) DeepCopyList

func (in *KernelChaosList) DeepCopyList() GenericChaosList

func (*KernelChaosList) DeepCopyObject

func (in *KernelChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*KernelChaosList) GetItems

func (in *KernelChaosList) GetItems() []GenericChaos

func (*KernelChaosList) ListChaos

func (in *KernelChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type KernelChaosSpec

type KernelChaosSpec struct {
	PodSelector `json:",inline"`

	// FailKernRequest defines the request of kernel injection
	FailKernRequest FailKernRequest `json:"failKernRequest"`

	// Duration represents the duration of the chaos action
	Duration *string `json:"duration,omitempty" webhook:"Duration"`
}

KernelChaosSpec defines the desired state of KernelChaos

func (*KernelChaosSpec) DeepCopy

func (in *KernelChaosSpec) DeepCopy() *KernelChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelChaosSpec.

func (*KernelChaosSpec) DeepCopyInto

func (in *KernelChaosSpec) DeepCopyInto(out *KernelChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KernelChaosSpec) GetDuration

func (in *KernelChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

type KernelChaosStatus

type KernelChaosStatus struct {
	ChaosStatus `json:",inline"`
}

KernelChaosStatus defines the observed state of KernelChaos

func (*KernelChaosStatus) DeepCopy

func (in *KernelChaosStatus) DeepCopy() *KernelChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelChaosStatus.

func (*KernelChaosStatus) DeepCopyInto

func (in *KernelChaosStatus) DeepCopyInto(out *KernelChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LabelSelectorRequirements

type LabelSelectorRequirements []metav1.LabelSelectorRequirement

LabelSelectorRequirements is list of LabelSelectorRequirement

func (LabelSelectorRequirements) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirements.

func (LabelSelectorRequirements) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LossSpec

type LossSpec struct {
	Loss string `json:"loss" webhook:"FloatStr"`
	// +optional
	Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"`
}

LossSpec defines detail of a loss action

func (*LossSpec) DeepCopy

func (in *LossSpec) DeepCopy() *LossSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LossSpec.

func (*LossSpec) DeepCopyInto

func (in *LossSpec) DeepCopyInto(out *LossSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MemoryStressor

type MemoryStressor struct {
	Stressor `json:",inline"`

	// Size specifies N bytes consumed per vm worker, default is the total available memory.
	// One can specify the size as % of total available memory or in units of B, KB/KiB,
	// MB/MiB, GB/GiB, TB/TiB.
	// +optional
	Size string `json:"size,omitempty" webhook:"Bytes"`

	// extend stress-ng options
	// +optional
	Options []string `json:"options,omitempty"`
}

MemoryStressor defines how to stress memory out

func (*MemoryStressor) DeepCopy

func (in *MemoryStressor) DeepCopy() *MemoryStressor

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryStressor.

func (*MemoryStressor) DeepCopyInto

func (in *MemoryStressor) DeepCopyInto(out *MemoryStressor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MistakeSpec

type MistakeSpec struct {
	// Filling determines what is filled in the miskate data.
	// +optional
	// +kubebuilder:validation:Enum=zero;random
	Filling FillingType `json:"filling,omitempty"`

	// There will be [1, MaxOccurrences] segments of wrong data.
	// +optional
	// +kubebuilder:validation:Minimum=1
	MaxOccurrences int64 `json:"maxOccurrences,omitempty"`

	// Max length of each wrong data segment in bytes
	// +optional
	// +kubebuilder:validation:Minimum=1
	MaxLength int64 `json:"maxLength,omitempty"`
}

MistakeSpec represents one type of mistake

func (*MistakeSpec) DeepCopy

func (in *MistakeSpec) DeepCopy() *MistakeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MistakeSpec.

func (*MistakeSpec) DeepCopyInto

func (in *MistakeSpec) DeepCopyInto(out *MistakeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkBandwidthSpec

type NetworkBandwidthSpec struct {
	Rate string `json:"rate"`
	// +kubebuilder:validation:Minimum=1
	Limit uint32 `json:"limit"`
	// +kubebuilder:validation:Minimum=1
	Buffer uint32 `json:"buffer"`

	Peakrate *uint64 `json:"peakrate,omitempty"`
	Minburst *uint32 `json:"minburst,omitempty"`

	Device    string `json:"device,omitempty"`
	IPAddress string `json:"ip-address,omitempty"`
	Hostname  string `json:"hostname,omitempty"`
}

func (*NetworkBandwidthSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkBandwidthSpec.

func (*NetworkBandwidthSpec) DeepCopyInto

func (in *NetworkBandwidthSpec) DeepCopyInto(out *NetworkBandwidthSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NetworkBandwidthSpec) Validate

func (in *NetworkBandwidthSpec) Validate(root interface{}, path *field.Path) field.ErrorList

type NetworkChaos

type NetworkChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a pod chaos experiment
	Spec NetworkChaosSpec `json:"spec"`

	// +optional
	// Most recently observed status of the chaos experiment about pods
	Status NetworkChaosStatus `json:"status"`
}

NetworkChaos is the Schema for the networkchaos API

func (*NetworkChaos) DeepCopy

func (in *NetworkChaos) DeepCopy() *NetworkChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkChaos.

func (*NetworkChaos) DeepCopyInto

func (in *NetworkChaos) DeepCopyInto(out *NetworkChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NetworkChaos) DeepCopyObject

func (in *NetworkChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*NetworkChaos) Default

func (in *NetworkChaos) Default()

func (*NetworkChaos) DurationExceeded

func (in *NetworkChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*NetworkChaos) GetCustomStatus

func (obj *NetworkChaos) GetCustomStatus() interface{}

func (*NetworkChaos) GetObjectMeta

func (in *NetworkChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*NetworkChaos) GetSelectorSpecs

func (obj *NetworkChaos) GetSelectorSpecs() map[string]interface{}

func (*NetworkChaos) GetSpecAndMetaString

func (in *NetworkChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*NetworkChaos) GetStatus

func (in *NetworkChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*NetworkChaos) IsDeleted

func (in *NetworkChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*NetworkChaos) IsOneShot

func (in *NetworkChaos) IsOneShot() bool

func (*NetworkChaos) IsPaused

func (in *NetworkChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*NetworkChaos) Validate

func (in *NetworkChaos) Validate() error

func (*NetworkChaos) ValidateCreate

func (in *NetworkChaos) ValidateCreate() error

func (*NetworkChaos) ValidateDelete

func (in *NetworkChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*NetworkChaos) ValidateUpdate

func (in *NetworkChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type NetworkChaosAction

type NetworkChaosAction string

NetworkChaosAction represents the chaos action about network.

const (
	// NetemAction is a combination of several chaos actions i.e. delay, loss, duplicate, corrupt.
	// When using this action multiple specs are merged into one Netem RPC and sends to chaos daemon.
	NetemAction NetworkChaosAction = "netem"

	// DelayAction represents the chaos action of adding delay on pods.
	DelayAction NetworkChaosAction = "delay"

	// LossAction represents the chaos action of losing packets on pods.
	LossAction NetworkChaosAction = "loss"

	// DuplicateAction represents the chaos action of duplicating packets on pods.
	DuplicateAction NetworkChaosAction = "duplicate"

	// CorruptAction represents the chaos action of corrupting packets on pods.
	CorruptAction NetworkChaosAction = "corrupt"

	// PartitionAction represents the chaos action of network partition of pods.
	PartitionAction NetworkChaosAction = "partition"

	// BandwidthAction represents the chaos action of network bandwidth of pods.
	BandwidthAction NetworkChaosAction = "bandwidth"
)

type NetworkChaosList

type NetworkChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NetworkChaos `json:"items"`
}

NetworkChaosList contains a list of NetworkChaos

func (*NetworkChaosList) DeepCopy

func (in *NetworkChaosList) DeepCopy() *NetworkChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkChaosList.

func (*NetworkChaosList) DeepCopyInto

func (in *NetworkChaosList) DeepCopyInto(out *NetworkChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NetworkChaosList) DeepCopyList

func (in *NetworkChaosList) DeepCopyList() GenericChaosList

func (*NetworkChaosList) DeepCopyObject

func (in *NetworkChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*NetworkChaosList) GetItems

func (in *NetworkChaosList) GetItems() []GenericChaos

func (*NetworkChaosList) ListChaos

func (in *NetworkChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type NetworkChaosSpec

type NetworkChaosSpec struct {
	PodSelector `json:",inline"`

	// Action defines the specific network chaos action.
	// Supported action: partition, netem, delay, loss, duplicate, corrupt
	// Default action: delay
	// +kubebuilder:validation:Enum=netem;delay;loss;duplicate;corrupt;partition;bandwidth
	Action NetworkChaosAction `json:"action"`

	// Device represents the network device to be affected.
	// +optional
	Device string `json:"device,omitempty"`

	// Duration represents the duration of the chaos action
	Duration *string `json:"duration,omitempty" webhook:"Duration"`

	// TcParameter represents the traffic control definition
	TcParameter `json:",inline"`

	// Direction represents the direction, this applies on netem and network partition action
	// +optional
	// +kubebuilder:validation:Enum=to;from;both;""
	Direction Direction `json:"direction,omitempty"`

	// Target represents network target, this applies on netem and network partition action
	// +optional
	Target *PodSelector `json:"target,omitempty" webhook:",nilable"`

	// TargetDevice represents the network device to be affected in target scope.
	// +optional
	TargetDevice string `json:"targetDevice,omitempty"`

	// ExternalTargets represents network targets outside k8s
	// +optional
	ExternalTargets []string `json:"externalTargets,omitempty"`
}

NetworkChaosSpec defines the desired state of NetworkChaos

func (*NetworkChaosSpec) DeepCopy

func (in *NetworkChaosSpec) DeepCopy() *NetworkChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkChaosSpec.

func (*NetworkChaosSpec) DeepCopyInto

func (in *NetworkChaosSpec) DeepCopyInto(out *NetworkChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NetworkChaosSpec) GetDuration

func (in *NetworkChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

func (*NetworkChaosSpec) Validate

func (in *NetworkChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList

ValidateTargets validates externalTargets and Targets

type NetworkChaosStatus

type NetworkChaosStatus struct {
	ChaosStatus `json:",inline"`
	// Instances always specifies podnetworkchaos generation or empty
	// +optional
	Instances map[string]int64 `json:"instances,omitempty"`
}

NetworkChaosStatus defines the observed state of NetworkChaos

func (*NetworkChaosStatus) DeepCopy

func (in *NetworkChaosStatus) DeepCopy() *NetworkChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkChaosStatus.

func (*NetworkChaosStatus) DeepCopyInto

func (in *NetworkChaosStatus) DeepCopyInto(out *NetworkChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkCommonSpec

type NetworkCommonSpec struct {
	// correlation is percentage (10 is 10%)
	Correlation string `json:"correlation,omitempty"`
	// the network interface to impact
	Device string `json:"device,omitempty"`
	// only impact egress traffic from these source ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.
	// it can only be used in conjunction with -p tcp or -p udp
	SourcePort string `json:"source-port,omitempty"`
	// only impact egress traffic to these destination ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010.
	// it can only be used in conjunction with -p tcp or -p udp
	EgressPort string `json:"egress-port,omitempty"`
	// only impact egress traffic to these IP addresses
	IPAddress string `json:"ip-address,omitempty"`
	// only impact traffic using this IP protocol, supported: tcp, udp, icmp, all
	IPProtocol string `json:"ip-protocol,omitempty"`
	// only impact traffic to these hostnames
	Hostname string `json:"hostname,omitempty"`
}

func (*NetworkCommonSpec) DeepCopy

func (in *NetworkCommonSpec) DeepCopy() *NetworkCommonSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCommonSpec.

func (*NetworkCommonSpec) DeepCopyInto

func (in *NetworkCommonSpec) DeepCopyInto(out *NetworkCommonSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkCorruptSpec

type NetworkCorruptSpec struct {
	NetworkCommonSpec `json:",inline"`

	// percentage of packets to corrupt (10 is 10%)
	Percent string `json:"percent,omitempty"`
}

func (*NetworkCorruptSpec) DeepCopy

func (in *NetworkCorruptSpec) DeepCopy() *NetworkCorruptSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCorruptSpec.

func (*NetworkCorruptSpec) DeepCopyInto

func (in *NetworkCorruptSpec) DeepCopyInto(out *NetworkCorruptSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkDNSSpec

type NetworkDNSSpec struct {
	// update the DNS server in /etc/resolv.conf with this value
	DNSServer string `json:"dns-server,omitempty"`
	// map specified host to this IP address
	DNSIp string `json:"dns-ip,omitempty"`
	// map this host to specified IP
	DNSDomainName string `json:"dns-domain-name,omitempty"`
}

func (*NetworkDNSSpec) DeepCopy

func (in *NetworkDNSSpec) DeepCopy() *NetworkDNSSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDNSSpec.

func (*NetworkDNSSpec) DeepCopyInto

func (in *NetworkDNSSpec) DeepCopyInto(out *NetworkDNSSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkDelaySpec

type NetworkDelaySpec struct {
	NetworkCommonSpec `json:",inline"`

	// jitter time, time units: ns, us (or µs), ms, s, m, h.
	Jitter string `json:"jitter,omitempty"`
	// delay egress time, time units: ns, us (or µs), ms, s, m, h.
	Latency string `json:"latency,omitempty"`
}

func (*NetworkDelaySpec) DeepCopy

func (in *NetworkDelaySpec) DeepCopy() *NetworkDelaySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDelaySpec.

func (*NetworkDelaySpec) DeepCopyInto

func (in *NetworkDelaySpec) DeepCopyInto(out *NetworkDelaySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkDuplicateSpec

type NetworkDuplicateSpec struct {
	NetworkCommonSpec `json:",inline"`

	// percentage of packets to duplicate (10 is 10%)
	Percent string `json:"percent,omitempty"`
}

func (*NetworkDuplicateSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDuplicateSpec.

func (*NetworkDuplicateSpec) DeepCopyInto

func (in *NetworkDuplicateSpec) DeepCopyInto(out *NetworkDuplicateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkLossSpec

type NetworkLossSpec struct {
	NetworkCommonSpec `json:",inline"`

	// percentage of packets to loss (10 is 10%)
	Percent string `json:"percent,omitempty"`
}

func (*NetworkLossSpec) DeepCopy

func (in *NetworkLossSpec) DeepCopy() *NetworkLossSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkLossSpec.

func (*NetworkLossSpec) DeepCopyInto

func (in *NetworkLossSpec) DeepCopyInto(out *NetworkLossSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkPartitionSpec

type NetworkPartitionSpec struct {
	// the network interface to impact
	Device string `json:"device,omitempty"`
	// only impact traffic to these hostnames
	Hostname string `json:"hostname,omitempty"`
	// only impact egress traffic to these IP addresses
	IPAddress string `json:"ip-address,omitempty"`
	// specifies the partition direction, values can be 'from', 'to'.
	// 'from' means packets coming from the 'IPAddress' or 'Hostname' and going to your server,
	// 'to' means packets originating from your server and going to the 'IPAddress' or 'Hostname'.
	Direction string `json:"direction,omitempty"`
	// only impact egress traffic to these IP addresses
	IPProtocol string `json:"ip-protocol,omitempty"`
	// only the packet which match the tcp flag can be accepted, others will be dropped.
	// only set when the IPProtocol is tcp, used for partition.
	AcceptTCPFlags string `json:"accept-tcp-flags,omitempty"`
}

func (*NetworkPartitionSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPartitionSpec.

func (*NetworkPartitionSpec) DeepCopyInto

func (in *NetworkPartitionSpec) DeepCopyInto(out *NetworkPartitionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Percent

type Percent int

func (*Percent) Validate

func (p *Percent) Validate(root interface{}, path *field.Path) field.ErrorList

type Phase

type Phase string
const (
	// NotInjected means the target is not injected yet. The controller could call "Inject" on the target
	NotInjected Phase = "Not Injected"
	// Injected means the target is injected. It's safe to recover it.
	Injected Phase = "Injected"
)

type PhysicalMachineChaos

type PhysicalMachineChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a physical machine chaos experiment
	Spec PhysicalMachineChaosSpec `json:"spec"`

	// +optional
	// Most recently observed status of the chaos experiment
	Status PhysicalMachineChaosStatus `json:"status"`
}

PhysicalMachineChaos is the Schema for the physical machine chaos API

func (*PhysicalMachineChaos) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineChaos.

func (*PhysicalMachineChaos) DeepCopyInto

func (in *PhysicalMachineChaos) DeepCopyInto(out *PhysicalMachineChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PhysicalMachineChaos) DeepCopyObject

func (in *PhysicalMachineChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PhysicalMachineChaos) Default

func (in *PhysicalMachineChaos) Default()

func (*PhysicalMachineChaos) DurationExceeded

func (in *PhysicalMachineChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*PhysicalMachineChaos) GetObjectMeta

func (in *PhysicalMachineChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*PhysicalMachineChaos) GetSelectorSpecs

func (obj *PhysicalMachineChaos) GetSelectorSpecs() map[string]interface{}

func (*PhysicalMachineChaos) GetSpecAndMetaString

func (in *PhysicalMachineChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*PhysicalMachineChaos) GetStatus

func (in *PhysicalMachineChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*PhysicalMachineChaos) IsDeleted

func (in *PhysicalMachineChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*PhysicalMachineChaos) IsOneShot

func (in *PhysicalMachineChaos) IsOneShot() bool

func (*PhysicalMachineChaos) IsPaused

func (in *PhysicalMachineChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*PhysicalMachineChaos) Validate

func (in *PhysicalMachineChaos) Validate() error

func (*PhysicalMachineChaos) ValidateCreate

func (in *PhysicalMachineChaos) ValidateCreate() error

func (*PhysicalMachineChaos) ValidateDelete

func (in *PhysicalMachineChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PhysicalMachineChaos) ValidateUpdate

func (in *PhysicalMachineChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PhysicalMachineChaosAction

type PhysicalMachineChaosAction string

PhysicalMachineChaosAction represents the chaos action about physical machine.

var (
	PMStressCPUAction        PhysicalMachineChaosAction = "stress-cpu"
	PMStressMemAction        PhysicalMachineChaosAction = "stress-mem"
	PMDiskWritePayloadAction PhysicalMachineChaosAction = "disk-write-payload"
	PMDiskReadPayloadAction  PhysicalMachineChaosAction = "disk-read-payload"
	PMDiskFillAction         PhysicalMachineChaosAction = "disk-fill"
	PMNetworkCorruptAction   PhysicalMachineChaosAction = "network-corrupt"
	PMNetworkDuplicateAction PhysicalMachineChaosAction = "network-duplicate"
	PMNetworkLossAction      PhysicalMachineChaosAction = "network-loss"
	PMNetworkDelayAction     PhysicalMachineChaosAction = "network-delay"
	PMNetworkPartitionAction PhysicalMachineChaosAction = "network-partition"
	PMNetworkDNSAction       PhysicalMachineChaosAction = "network-dns"
	PMProcessAction          PhysicalMachineChaosAction = "process"
	PMJVMExceptionAction     PhysicalMachineChaosAction = "jvm-exception"
	PMJVMGCAction            PhysicalMachineChaosAction = "jvm-gc"
	PMJVMLatencyAction       PhysicalMachineChaosAction = "jvm-latency"
	PMJVMReturnAction        PhysicalMachineChaosAction = "jvm-return"
	PMJVMStressAction        PhysicalMachineChaosAction = "jvm-stress"
	PMJVMRuleDataAction      PhysicalMachineChaosAction = "jvm-rule-data"
	PMClockAction            PhysicalMachineChaosAction = "clock"
)

type PhysicalMachineChaosList

type PhysicalMachineChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PhysicalMachineChaos `json:"items"`
}

PhysicalMachineChaosList contains a list of PhysicalMachineChaos

func (*PhysicalMachineChaosList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineChaosList.

func (*PhysicalMachineChaosList) DeepCopyInto

func (in *PhysicalMachineChaosList) DeepCopyInto(out *PhysicalMachineChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PhysicalMachineChaosList) DeepCopyList

func (in *PhysicalMachineChaosList) DeepCopyList() GenericChaosList

func (*PhysicalMachineChaosList) DeepCopyObject

func (in *PhysicalMachineChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PhysicalMachineChaosList) GetItems

func (in *PhysicalMachineChaosList) GetItems() []GenericChaos

func (*PhysicalMachineChaosList) ListChaos

func (in *PhysicalMachineChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type PhysicalMachineChaosSpec

type PhysicalMachineChaosSpec struct {
	// +kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;clock
	Action PhysicalMachineChaosAction `json:"action"`

	PhysicalMachineSelector `json:",inline"`

	// ExpInfo string `json:"expInfo"`
	ExpInfo `json:",inline"`

	// Duration represents the duration of the chaos action
	// +optional
	Duration *string `json:"duration,omitempty" webhook:"Duration"`
}

PhysicalMachineChaosSpec defines the desired state of PhysicalMachineChaos

func (*PhysicalMachineChaosSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineChaosSpec.

func (*PhysicalMachineChaosSpec) DeepCopyInto

func (in *PhysicalMachineChaosSpec) DeepCopyInto(out *PhysicalMachineChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PhysicalMachineChaosSpec) Default

func (in *PhysicalMachineChaosSpec) Default(root interface{}, field *reflect.StructField)

func (*PhysicalMachineChaosSpec) GetDuration

func (in *PhysicalMachineChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

func (*PhysicalMachineChaosSpec) Validate

func (in *PhysicalMachineChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList

type PhysicalMachineChaosStatus

type PhysicalMachineChaosStatus struct {
	ChaosStatus `json:",inline"`
}

PhysicalMachineChaosStatus defines the observed state of PhysicalMachineChaos

func (*PhysicalMachineChaosStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineChaosStatus.

func (*PhysicalMachineChaosStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PhysicalMachineSelector

type PhysicalMachineSelector struct {
	Address []string `json:"address"`
}

func (*PhysicalMachineSelector) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineSelector.

func (*PhysicalMachineSelector) DeepCopyInto

func (in *PhysicalMachineSelector) DeepCopyInto(out *PhysicalMachineSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodChaos

type PodChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a pod chaos experiment
	Spec PodChaosSpec `json:"spec"`

	// +optional
	// Most recently observed status of the chaos experiment about pods
	Status PodChaosStatus `json:"status"`
}

PodChaos is the control script`s spec.

func (*PodChaos) DeepCopy

func (in *PodChaos) DeepCopy() *PodChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodChaos.

func (*PodChaos) DeepCopyInto

func (in *PodChaos) DeepCopyInto(out *PodChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodChaos) DeepCopyObject

func (in *PodChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PodChaos) Default

func (in *PodChaos) Default()

func (*PodChaos) DurationExceeded

func (in *PodChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*PodChaos) GetObjectMeta

func (in *PodChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*PodChaos) GetSelectorSpecs

func (obj *PodChaos) GetSelectorSpecs() map[string]interface{}

func (*PodChaos) GetSpecAndMetaString

func (in *PodChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*PodChaos) GetStatus

func (in *PodChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*PodChaos) IsDeleted

func (in *PodChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*PodChaos) IsOneShot

func (in *PodChaos) IsOneShot() bool

func (*PodChaos) IsPaused

func (in *PodChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*PodChaos) Validate

func (in *PodChaos) Validate() error

func (*PodChaos) ValidateCreate

func (in *PodChaos) ValidateCreate() error

func (*PodChaos) ValidateDelete

func (in *PodChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PodChaos) ValidateUpdate

func (in *PodChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PodChaosAction

type PodChaosAction string

PodChaosAction represents the chaos action about pods.

const (
	// PodKillAction represents the chaos action of killing pods.
	PodKillAction PodChaosAction = "pod-kill"
	// PodFailureAction represents the chaos action of injecting errors to pods.
	// This action will cause the pod to not be created for a while.
	PodFailureAction PodChaosAction = "pod-failure"
	// ContainerKillAction represents the chaos action of killing the container
	ContainerKillAction PodChaosAction = "container-kill"
)

type PodChaosList

type PodChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PodChaos `json:"items"`
}

PodChaosList contains a list of PodChaos

func (*PodChaosList) DeepCopy

func (in *PodChaosList) DeepCopy() *PodChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodChaosList.

func (*PodChaosList) DeepCopyInto

func (in *PodChaosList) DeepCopyInto(out *PodChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodChaosList) DeepCopyList

func (in *PodChaosList) DeepCopyList() GenericChaosList

func (*PodChaosList) DeepCopyObject

func (in *PodChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PodChaosList) GetItems

func (in *PodChaosList) GetItems() []GenericChaos

func (*PodChaosList) ListChaos

func (in *PodChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type PodChaosSpec

type PodChaosSpec struct {
	ContainerSelector `json:",inline"`

	// Action defines the specific pod chaos action.
	// Supported action: pod-kill / pod-failure / container-kill
	// Default action: pod-kill
	// +kubebuilder:validation:Enum=pod-kill;pod-failure;container-kill
	Action PodChaosAction `json:"action"`

	// Duration represents the duration of the chaos action.
	// It is required when the action is `PodFailureAction`.
	// A duration string is a possibly signed sequence of
	// decimal numbers, each with optional fraction and a unit suffix,
	// such as "300ms", "-1.5h" or "2h45m".
	// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
	// +optional
	Duration *string `json:"duration,omitempty" webhook:"Duration"`

	// GracePeriod is used in pod-kill action. It represents the duration in seconds before the pod should be deleted.
	// Value must be non-negative integer. The default value is zero that indicates delete immediately.
	// +optional
	// +kubebuilder:validation:Minimum=0
	GracePeriod int64 `json:"gracePeriod"`
}

PodChaosSpec defines the attributes that a user creates on a chaos experiment about pods.

func (*PodChaosSpec) DeepCopy

func (in *PodChaosSpec) DeepCopy() *PodChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodChaosSpec.

func (*PodChaosSpec) DeepCopyInto

func (in *PodChaosSpec) DeepCopyInto(out *PodChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodChaosSpec) GetDuration

func (in *PodChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

func (*PodChaosSpec) Validate

func (in *PodChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList

validateContainerNames validates the ContainerNames

type PodChaosStatus

type PodChaosStatus struct {
	ChaosStatus `json:",inline"`
}

PodChaosStatus represents the current status of the chaos experiment about pods.

func (*PodChaosStatus) DeepCopy

func (in *PodChaosStatus) DeepCopy() *PodChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodChaosStatus.

func (*PodChaosStatus) DeepCopyInto

func (in *PodChaosStatus) DeepCopyInto(out *PodChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaos

type PodHttpChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PodHttpChaosSpec   `json:"spec,omitempty"`
	Status PodHttpChaosStatus `json:"status,omitempty"`
}

+chaos-mesh:base +chaos-mesh:webhook:enableUpdate +kubebuilder:subresource:status PodHttpChaos is the Schema for the podhttpchaos API

func (*PodHttpChaos) DeepCopy

func (in *PodHttpChaos) DeepCopy() *PodHttpChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaos.

func (*PodHttpChaos) DeepCopyInto

func (in *PodHttpChaos) DeepCopyInto(out *PodHttpChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodHttpChaos) DeepCopyObject

func (in *PodHttpChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PodHttpChaos) Default

func (in *PodHttpChaos) Default()

func (*PodHttpChaos) SetupWebhookWithManager

func (in *PodHttpChaos) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager setup PodHttpChaos's webhook with manager

func (*PodHttpChaos) Validate

func (in *PodHttpChaos) Validate() error

func (*PodHttpChaos) ValidateCreate

func (in *PodHttpChaos) ValidateCreate() error

func (*PodHttpChaos) ValidateDelete

func (in *PodHttpChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PodHttpChaos) ValidateUpdate

func (in *PodHttpChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PodHttpChaosActions

type PodHttpChaosActions struct {
	// Abort is a rule to abort a http session.
	// +optional
	Abort *bool `json:"abort,omitempty"`

	// Delay represents the delay of the target request/response.
	// A duration string is a possibly unsigned sequence of
	// decimal numbers, each with optional fraction and a unit suffix,
	// such as "300ms", "2h45m".
	// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
	// +optional
	Delay *string `json:"delay,omitempty"`

	// Replace is a rule to replace some contents in target.
	// +optional
	Replace *PodHttpChaosReplaceActions `json:"replace,omitempty"`

	// Patch is a rule to patch some contents in target.
	// +optional
	Patch *PodHttpChaosPatchActions `json:"patch,omitempty"`
}

PodHttpChaosAction defines possible actions of HttpChaos.

func (*PodHttpChaosActions) DeepCopy

func (in *PodHttpChaosActions) DeepCopy() *PodHttpChaosActions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosActions.

func (*PodHttpChaosActions) DeepCopyInto

func (in *PodHttpChaosActions) DeepCopyInto(out *PodHttpChaosActions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaosBaseRule

type PodHttpChaosBaseRule struct {
	// Target is the object to be selected and injected, <Request|Response>.
	Target PodHttpChaosTarget `json:"target"`

	// Selector contains the rules to select target.
	Selector PodHttpChaosSelector `json:"selector"`

	// Actions contains rules to inject target.
	Actions PodHttpChaosActions `json:"actions"`
}

PodHttpChaosBaseRule defines the injection rule without source and port.

func (*PodHttpChaosBaseRule) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosBaseRule.

func (*PodHttpChaosBaseRule) DeepCopyInto

func (in *PodHttpChaosBaseRule) DeepCopyInto(out *PodHttpChaosBaseRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaosHandler

type PodHttpChaosHandler interface {
	Apply(context.Context, *PodHttpChaos) (int32, error)
}

PodHttpChaosHandler represents the implementation of podhttpchaos

type PodHttpChaosList

type PodHttpChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PodHttpChaos `json:"items"`
}

PodHttpChaosList contains a list of PodHttpChaos

func (*PodHttpChaosList) DeepCopy

func (in *PodHttpChaosList) DeepCopy() *PodHttpChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosList.

func (*PodHttpChaosList) DeepCopyInto

func (in *PodHttpChaosList) DeepCopyInto(out *PodHttpChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodHttpChaosList) DeepCopyObject

func (in *PodHttpChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodHttpChaosPatchActions

type PodHttpChaosPatchActions struct {
	// Body is a rule to patch message body of target.
	// +optional
	Body *PodHttpChaosPatchBodyAction `json:"body,omitempty"`

	// Queries is a rule to append uri queries of target(Request only).
	// For example: `[["foo", "bar"], ["foo", "unknown"]]`.
	// +optional
	Queries [][]string `json:"queries,omitempty"`

	// Headers is a rule to append http headers of target.
	// For example: `[["Set-Cookie", "<one cookie>"], ["Set-Cookie", "<another cookie>"]]`.
	// +optional
	Headers [][]string `json:"headers,omitempty"`
}

PodHttpChaosPatchActions defines possible patch-actions of HttpChaos.

func (*PodHttpChaosPatchActions) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosPatchActions.

func (*PodHttpChaosPatchActions) DeepCopyInto

func (in *PodHttpChaosPatchActions) DeepCopyInto(out *PodHttpChaosPatchActions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaosPatchBodyAction

type PodHttpChaosPatchBodyAction struct {
	// Type represents the patch type, only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) currently.
	Type string `json:"type"`

	// Value is the patch contents.
	Value string `json:"value"`
}

PodHttpChaosPatchBodyAction defines patch body action of HttpChaos.

func (*PodHttpChaosPatchBodyAction) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosPatchBodyAction.

func (*PodHttpChaosPatchBodyAction) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaosReplaceActions

type PodHttpChaosReplaceActions struct {
	// Path is rule to to replace uri path in http request.
	// +optional
	Path *string `json:"path,omitempty"`

	// Method is a rule to replace http method in request.
	// +optional
	Method *string `json:"method,omitempty"`

	// Code is a rule to replace http status code in response.
	// +optional
	Code *int32 `json:"code,omitempty"`

	// Body is a rule to replace http message body in target.
	// +optional
	Body []byte `json:"body,omitempty"`

	// Queries is a rule to replace uri queries in http request.
	// For example, with value `{ "foo": "unknown" }`, the `/?foo=bar` will be altered to `/?foo=unknown`,
	// +optional
	Queries map[string]string `json:"queries,omitempty"`

	// Headers is a rule to replace http headers of target.
	// The key-value pairs represent header name and header value pairs.
	// +optional
	Headers map[string]string `json:"headers,omitempty"`
}

PodHttpChaosReplaceActions defines possible replace-actions of HttpChaos.

func (*PodHttpChaosReplaceActions) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosReplaceActions.

func (*PodHttpChaosReplaceActions) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaosRule

type PodHttpChaosRule struct {
	PodHttpChaosBaseRule `json:",inline"`

	// Source represents the source of current rules
	Source string `json:"source,omitempty"`

	// Port represents the target port to be proxy of.
	Port int32 `json:"port"`
}

PodHttpChaosRule defines the injection rule for http.

func (*PodHttpChaosRule) DeepCopy

func (in *PodHttpChaosRule) DeepCopy() *PodHttpChaosRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosRule.

func (*PodHttpChaosRule) DeepCopyInto

func (in *PodHttpChaosRule) DeepCopyInto(out *PodHttpChaosRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaosSelector

type PodHttpChaosSelector struct {
	// Port is a rule to select server listening on specific port.
	// +optional
	Port *int32 `json:"port,omitempty"`

	// Path is a rule to select target by uri path in http request.
	// +optional
	Path *string `json:"path,omitempty"`

	// Method is a rule to select target by http method in request.
	// +optional
	Method *string `json:"method,omitempty"`

	// Code is a rule to select target by http status code in response.
	// +optional
	Code *int32 `json:"code,omitempty"`

	// RequestHeaders is a rule to select target by http headers in request.
	// The key-value pairs represent header name and header value pairs.
	// +optional
	RequestHeaders map[string]string `json:"request_headers,omitempty"`

	// ResponseHeaders is a rule to select target by http headers in response.
	// The key-value pairs represent header name and header value pairs.
	// +optional
	ResponseHeaders map[string]string `json:"response_headers,omitempty"`
}

func (*PodHttpChaosSelector) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosSelector.

func (*PodHttpChaosSelector) DeepCopyInto

func (in *PodHttpChaosSelector) DeepCopyInto(out *PodHttpChaosSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaosSpec

type PodHttpChaosSpec struct {
	// Rules are a list of injection rule for http request.
	// +optional
	Rules []PodHttpChaosRule `json:"rules,omitempty"`
}

PodHttpChaosSpec defines the desired state of PodHttpChaos.

func (*PodHttpChaosSpec) DeepCopy

func (in *PodHttpChaosSpec) DeepCopy() *PodHttpChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosSpec.

func (*PodHttpChaosSpec) DeepCopyInto

func (in *PodHttpChaosSpec) DeepCopyInto(out *PodHttpChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaosStatus

type PodHttpChaosStatus struct {
	// Pid represents a running tproxy process id.
	// +optional
	Pid int64 `json:"pid,omitempty"`

	// StartTime represents the start time of a tproxy process.
	// +optional
	StartTime int64 `json:"startTime,omitempty"`

	// +optional
	FailedMessage string `json:"failedMessage,omitempty"`

	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

PodHttpChaosStatus defines the actual state of PodHttpChaos.

func (*PodHttpChaosStatus) DeepCopy

func (in *PodHttpChaosStatus) DeepCopy() *PodHttpChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosStatus.

func (*PodHttpChaosStatus) DeepCopyInto

func (in *PodHttpChaosStatus) DeepCopyInto(out *PodHttpChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodHttpChaosTarget

type PodHttpChaosTarget string

PodHttpChaosTarget represents the type of an HttpChaos Action

const (
	// PodHttpRequest represents injecting chaos for http request
	PodHttpRequest PodHttpChaosTarget = "Request"

	// PodHttpResponse represents injecting chaos for http response
	PodHttpResponse PodHttpChaosTarget = "Response"
)

func (*PodHttpChaosTarget) Validate

func (in *PodHttpChaosTarget) Validate(root interface{}, path *field.Path) field.ErrorList

type PodHttpChaosWebhookRunner

type PodHttpChaosWebhookRunner struct {
	// contains filtered or unexported fields
}

PodHttpChaosWebhookRunner runs webhook for podhttpchaos

func (*PodHttpChaosWebhookRunner) Handle

Handle will run podhttpchaoshandler for this resource

func (*PodHttpChaosWebhookRunner) InjectDecoder

func (r *PodHttpChaosWebhookRunner) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects decoder into webhook runner

type PodIOChaos

type PodIOChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec PodIOChaosSpec `json:"spec,omitempty"`

	//+optional
	Status PodIOChaosStatus `json:"status,omitempty"`
}

+chaos-mesh:base +chaos-mesh:webhook:enableUpdate +kubebuilder:object:root=true +kubebuilder:subresource:status PodIOChaos is the Schema for the podiochaos API

func (*PodIOChaos) DeepCopy

func (in *PodIOChaos) DeepCopy() *PodIOChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIOChaos.

func (*PodIOChaos) DeepCopyInto

func (in *PodIOChaos) DeepCopyInto(out *PodIOChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodIOChaos) DeepCopyObject

func (in *PodIOChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PodIOChaos) Default

func (in *PodIOChaos) Default()

func (*PodIOChaos) Validate

func (in *PodIOChaos) Validate() error

func (*PodIOChaos) ValidateCreate

func (in *PodIOChaos) ValidateCreate() error

func (*PodIOChaos) ValidateDelete

func (in *PodIOChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PodIOChaos) ValidateUpdate

func (in *PodIOChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PodIOChaosList

type PodIOChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PodIOChaos `json:"items"`
}

PodIOChaosList contains a list of PodIOChaos

func (*PodIOChaosList) DeepCopy

func (in *PodIOChaosList) DeepCopy() *PodIOChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIOChaosList.

func (*PodIOChaosList) DeepCopyInto

func (in *PodIOChaosList) DeepCopyInto(out *PodIOChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodIOChaosList) DeepCopyObject

func (in *PodIOChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodIOChaosSpec

type PodIOChaosSpec struct {
	// VolumeMountPath represents the target mount path
	// It must be a root of mount path now.
	// TODO: search the mount parent of any path automatically.
	// TODO: support multiple different volume mount path in one pod
	VolumeMountPath string `json:"volumeMountPath"`

	// TODO: support multiple different container to inject in one pod
	// +optional
	Container *string `json:"container,omitempty"`

	// Actions are a list of IOChaos actions
	// +optional
	Actions []IOChaosAction `json:"actions,omitempty"`
}

PodIOChaosSpec defines the desired state of IOChaos

func (*PodIOChaosSpec) DeepCopy

func (in *PodIOChaosSpec) DeepCopy() *PodIOChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIOChaosSpec.

func (*PodIOChaosSpec) DeepCopyInto

func (in *PodIOChaosSpec) DeepCopyInto(out *PodIOChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodIOChaosStatus

type PodIOChaosStatus struct {

	// Pid represents a running toda process id
	// +optional
	Pid int64 `json:"pid,omitempty"`

	// StartTime represents the start time of a toda process
	// +optional
	StartTime int64 `json:"startTime,omitempty"`

	// +optional
	FailedMessage string `json:"failedMessage,omitempty"`

	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

func (*PodIOChaosStatus) DeepCopy

func (in *PodIOChaosStatus) DeepCopy() *PodIOChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIOChaosStatus.

func (*PodIOChaosStatus) DeepCopyInto

func (in *PodIOChaosStatus) DeepCopyInto(out *PodIOChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodNetworkChaos

type PodNetworkChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a pod chaos experiment
	Spec PodNetworkChaosSpec `json:"spec"`

	// +optional
	// Most recently observed status of the chaos experiment about pods
	Status PodNetworkChaosStatus `json:"status"`
}

PodNetworkChaos is the Schema for the PodNetworkChaos API

func (*PodNetworkChaos) DeepCopy

func (in *PodNetworkChaos) DeepCopy() *PodNetworkChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkChaos.

func (*PodNetworkChaos) DeepCopyInto

func (in *PodNetworkChaos) DeepCopyInto(out *PodNetworkChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodNetworkChaos) DeepCopyObject

func (in *PodNetworkChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*PodNetworkChaos) Default

func (in *PodNetworkChaos) Default()

func (*PodNetworkChaos) Validate

func (in *PodNetworkChaos) Validate() error

func (*PodNetworkChaos) ValidateCreate

func (in *PodNetworkChaos) ValidateCreate() error

func (*PodNetworkChaos) ValidateDelete

func (in *PodNetworkChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PodNetworkChaos) ValidateUpdate

func (in *PodNetworkChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PodNetworkChaosList

type PodNetworkChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PodNetworkChaos `json:"items"`
}

PodNetworkChaosList contains a list of PodNetworkChaos

func (*PodNetworkChaosList) DeepCopy

func (in *PodNetworkChaosList) DeepCopy() *PodNetworkChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkChaosList.

func (*PodNetworkChaosList) DeepCopyInto

func (in *PodNetworkChaosList) DeepCopyInto(out *PodNetworkChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodNetworkChaosList) DeepCopyObject

func (in *PodNetworkChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodNetworkChaosSpec

type PodNetworkChaosSpec struct {
	// The ipset on the pod
	// +optional
	IPSets []RawIPSet `json:"ipsets,omitempty"`

	// The iptables rules on the pod
	// +optional
	Iptables []RawIptables `json:"iptables,omitempty"`

	// The tc rules on the pod
	// +optional
	TrafficControls []RawTrafficControl `json:"tcs,omitempty"`
}

PodNetworkChaosSpec defines the desired state of PodNetworkChaos

func (*PodNetworkChaosSpec) DeepCopy

func (in *PodNetworkChaosSpec) DeepCopy() *PodNetworkChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkChaosSpec.

func (*PodNetworkChaosSpec) DeepCopyInto

func (in *PodNetworkChaosSpec) DeepCopyInto(out *PodNetworkChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodNetworkChaosStatus

type PodNetworkChaosStatus struct {
	FailedMessage string `json:"failedMessage,omitempty"`

	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

PodNetworkChaosStatus defines the observed state of PodNetworkChaos

func (*PodNetworkChaosStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkChaosStatus.

func (*PodNetworkChaosStatus) DeepCopyInto

func (in *PodNetworkChaosStatus) DeepCopyInto(out *PodNetworkChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodSelector

type PodSelector struct {
	// Selector is used to select pods that are used to inject chaos action.
	Selector PodSelectorSpec `json:"selector"`

	// Mode defines the mode to run chaos action.
	// Supported mode: one / all / fixed / fixed-percent / random-max-percent
	// +kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent
	Mode SelectorMode `json:"mode"`

	// Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`.
	// If `FixedMode`, provide an integer of pods to do chaos action.
	// If `FixedPercentMode`, provide a number from 0-100 to specify the percent of pods the server can do chaos action.
	// IF `RandomMaxPercentMode`,  provide a number from 0-100 to specify the max percent of pods to do chaos action
	// +optional
	Value string `json:"value,omitempty"`
}

func (*PodSelector) DeepCopy

func (in *PodSelector) DeepCopy() *PodSelector

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSelector.

func (*PodSelector) DeepCopyInto

func (in *PodSelector) DeepCopyInto(out *PodSelector)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodSelector) Default

func (p *PodSelector) Default(root interface{}, field *reflect.StructField)

func (*PodSelector) Validate

func (p *PodSelector) Validate(root interface{}, path *field.Path) field.ErrorList

type PodSelectorSpec

type PodSelectorSpec struct {
	GenericSelectorSpec `json:",inline"`

	// Nodes is a set of node name and objects must belong to these nodes.
	// +optional
	Nodes []string `json:"nodes,omitempty"`

	// Pods is a map of string keys and a set values that used to select pods.
	// The key defines the namespace which pods belong,
	// and the each values is a set of pod names.
	// +optional
	Pods map[string][]string `json:"pods,omitempty"`

	// Map of string keys and values that can be used to select nodes.
	// Selector which must match a node's labels,
	// and objects must belong to these selected nodes.
	// +optional
	NodeSelectors map[string]string `json:"nodeSelectors,omitempty"`

	// PodPhaseSelectors is a set of condition of a pod at the current time.
	// supported value: Pending / Running / Succeeded / Failed / Unknown
	// +optional
	PodPhaseSelectors []string `json:"podPhaseSelectors,omitempty"`
}

PodSelectorSpec defines the some selectors to select objects. If the all selectors are empty, all objects will be used in chaos experiment.

func (PodSelectorSpec) ClusterScoped

func (in PodSelectorSpec) ClusterScoped() bool

ClusterScoped returns true if the selector selects Pods in the cluster

func (*PodSelectorSpec) DeepCopy

func (in *PodSelectorSpec) DeepCopy() *PodSelectorSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSelectorSpec.

func (*PodSelectorSpec) DeepCopyInto

func (in *PodSelectorSpec) DeepCopyInto(out *PodSelectorSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodSelectorSpec) DefaultNamespace

func (in *PodSelectorSpec) DefaultNamespace(namespace string)

type Port

type Port int32

func (*Port) Validate

func (in *Port) Validate(root interface{}, path *field.Path) field.ErrorList

type ProcessSpec

type ProcessSpec struct {
	// the process name or the process ID
	Process string `json:"process,omitempty"`
	// the signal number to send
	Signal int `json:"signal,omitempty"`
}

func (*ProcessSpec) DeepCopy

func (in *ProcessSpec) DeepCopy() *ProcessSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProcessSpec.

func (*ProcessSpec) DeepCopyInto

func (in *ProcessSpec) DeepCopyInto(out *ProcessSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Rate

type Rate string

func (*Rate) Validate

func (in *Rate) Validate(root interface{}, path *field.Path) field.ErrorList

validateBandwidth validates the bandwidth

type RawIPSet

type RawIPSet struct {
	// The name of ipset
	Name string `json:"name"`

	// The contents of ipset
	Cidrs []string `json:"cidrs"`

	// The name and namespace of the source network chaos
	RawRuleSource `json:",inline"`
}

RawIPSet represents an ipset on specific pod

func (*RawIPSet) DeepCopy

func (in *RawIPSet) DeepCopy() *RawIPSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawIPSet.

func (*RawIPSet) DeepCopyInto

func (in *RawIPSet) DeepCopyInto(out *RawIPSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RawIptables

type RawIptables struct {
	// The name of iptables chain
	Name string `json:"name"`

	// The name of related ipset
	// +optional
	// +nullable
	IPSets []string `json:"ipsets,omitempty"`

	// The block direction of this iptables rule
	Direction ChainDirection `json:"direction"`

	// Device represents the network device to be affected.
	// +optional
	Device string `json:"device,omitempty"`

	RawRuleSource `json:",inline"`
}

RawIptables represents the iptables rules on specific pod

func (*RawIptables) DeepCopy

func (in *RawIptables) DeepCopy() *RawIptables

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawIptables.

func (*RawIptables) DeepCopyInto

func (in *RawIptables) DeepCopyInto(out *RawIptables)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RawRuleSource

type RawRuleSource struct {
	Source string `json:"source"`
}

RawRuleSource represents the name and namespace of the source network chaos

func (*RawRuleSource) DeepCopy

func (in *RawRuleSource) DeepCopy() *RawRuleSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawRuleSource.

func (*RawRuleSource) DeepCopyInto

func (in *RawRuleSource) DeepCopyInto(out *RawRuleSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RawTrafficControl

type RawTrafficControl struct {
	// The type of traffic control
	Type TcType `json:"type"`

	TcParameter `json:",inline"`

	// The name of target ipset
	// +optional
	IPSet string `json:"ipset,omitempty"`

	// The name and namespace of the source network chaos
	Source string `json:"source"`

	// Device represents the network device to be affected.
	// +optional
	Device string `json:"device,omitempty"`
}

RawTrafficControl represents the traffic control chaos on specific pod

func (*RawTrafficControl) DeepCopy

func (in *RawTrafficControl) DeepCopy() *RawTrafficControl

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawTrafficControl.

func (*RawTrafficControl) DeepCopyInto

func (in *RawTrafficControl) DeepCopyInto(out *RawTrafficControl)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Record

type Record struct {
	Id          string `json:"id"`
	SelectorKey string `json:"selectorKey"`
	Phase       Phase  `json:"phase"`
}

func (*Record) DeepCopy

func (in *Record) DeepCopy() *Record

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Record.

func (*Record) DeepCopyInto

func (in *Record) DeepCopyInto(out *Record)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReorderSpec

type ReorderSpec struct {
	Reorder string `json:"reorder" webhook:"FloatStr"`
	// +optional
	Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"`
	Gap         int    `json:"gap"`
}

ReorderSpec defines details of packet reorder.

func (*ReorderSpec) DeepCopy

func (in *ReorderSpec) DeepCopy() *ReorderSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReorderSpec.

func (*ReorderSpec) DeepCopyInto

func (in *ReorderSpec) DeepCopyInto(out *ReorderSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Schedule

type Schedule struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ScheduleSpec `json:"spec"`

	// +optional
	Status ScheduleStatus `json:"status"`
}

Schedule is the cronly schedule object

func (*Schedule) DeepCopy

func (in *Schedule) DeepCopy() *Schedule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Schedule.

func (*Schedule) DeepCopyInto

func (in *Schedule) DeepCopyInto(out *Schedule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Schedule) DeepCopyObject

func (in *Schedule) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Schedule) Default

func (in *Schedule) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Schedule) IsPaused

func (in *Schedule) IsPaused() bool

func (*Schedule) Validate

func (in *Schedule) Validate() error

Validate validates chaos object

func (*Schedule) ValidateCreate

func (in *Schedule) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Schedule) ValidateDelete

func (in *Schedule) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Schedule) ValidateUpdate

func (in *Schedule) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ScheduleItem

type ScheduleItem struct {
	EmbedChaos `json:",inline"`
	// +optional
	Workflow *WorkflowSpec `json:"workflow,omitempty"`
}

func (*ScheduleItem) DeepCopy

func (in *ScheduleItem) DeepCopy() *ScheduleItem

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduleItem.

func (*ScheduleItem) DeepCopyInto

func (in *ScheduleItem) DeepCopyInto(out *ScheduleItem)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ScheduleItem) RestoreChaosSpec

func (it *ScheduleItem) RestoreChaosSpec(root interface{}) error

func (*ScheduleItem) SpawnNewObject

func (it *ScheduleItem) SpawnNewObject(templateType ScheduleTemplateType) (GenericChaos, error)

type ScheduleList

type ScheduleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Schedule `json:"items"`
}

ScheduleList contains a list of Schedule

func (*ScheduleList) DeepCopy

func (in *ScheduleList) DeepCopy() *ScheduleList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduleList.

func (*ScheduleList) DeepCopyInto

func (in *ScheduleList) DeepCopyInto(out *ScheduleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ScheduleList) DeepCopyList

func (in *ScheduleList) DeepCopyList() GenericChaosList

func (*ScheduleList) DeepCopyObject

func (in *ScheduleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*ScheduleList) GetItems

func (in *ScheduleList) GetItems() []GenericChaos

type ScheduleSpec

type ScheduleSpec struct {
	Schedule string `json:"schedule"`

	// +optional
	// +nullable
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:ExclusiveMinimum=true
	StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds"`

	// +optional
	// +kubebuilder:validation:Enum=Forbid;Allow
	ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy"`

	// +optional
	// +kubebuilder:validation:Minimum=1
	HistoryLimit int `json:"historyLimit,omitempty"`

	// TODO: use a custom type, as `TemplateType` contains other possible values
	Type ScheduleTemplateType `json:"type"`

	ScheduleItem `json:",inline"`
}

ScheduleSpec is the specification of a schedule object

func (*ScheduleSpec) DeepCopy

func (in *ScheduleSpec) DeepCopy() *ScheduleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduleSpec.

func (*ScheduleSpec) DeepCopyInto

func (in *ScheduleSpec) DeepCopyInto(out *ScheduleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ScheduleSpec) Validate

func (in *ScheduleSpec) Validate() field.ErrorList

type ScheduleStatus

type ScheduleStatus struct {
	// +optional
	Active []corev1.ObjectReference `json:"active,omitempty"`

	// +optional
	// +nullable
	LastScheduleTime metav1.Time `json:"time,omitempty"`
}

ScheduleStatus is the status of a schedule object

func (*ScheduleStatus) DeepCopy

func (in *ScheduleStatus) DeepCopy() *ScheduleStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduleStatus.

func (*ScheduleStatus) DeepCopyInto

func (in *ScheduleStatus) DeepCopyInto(out *ScheduleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScheduleTemplateType

type ScheduleTemplateType string
const (
	ScheduleTypeAWSChaos             ScheduleTemplateType = "AWSChaos"
	ScheduleTypeDNSChaos             ScheduleTemplateType = "DNSChaos"
	ScheduleTypeGCPChaos             ScheduleTemplateType = "GCPChaos"
	ScheduleTypeHTTPChaos            ScheduleTemplateType = "HTTPChaos"
	ScheduleTypeIOChaos              ScheduleTemplateType = "IOChaos"
	ScheduleTypeJVMChaos             ScheduleTemplateType = "JVMChaos"
	ScheduleTypeKernelChaos          ScheduleTemplateType = "KernelChaos"
	ScheduleTypeNetworkChaos         ScheduleTemplateType = "NetworkChaos"
	ScheduleTypePhysicalMachineChaos ScheduleTemplateType = "PhysicalMachineChaos"
	ScheduleTypePodChaos             ScheduleTemplateType = "PodChaos"
	ScheduleTypeStressChaos          ScheduleTemplateType = "StressChaos"
	ScheduleTypeTimeChaos            ScheduleTemplateType = "TimeChaos"
	ScheduleTypeWorkflow             ScheduleTemplateType = "Workflow"
)

type SelectorMode

type SelectorMode string

SelectorMode represents the mode to run chaos action.

const (
	// OneMode represents that the system will do the chaos action on one object selected randomly.
	OneMode SelectorMode = "one"
	// AllMode represents that the system will do the chaos action on all objects
	// regardless of status (not ready or not running pods includes).
	// Use this label carefully.
	AllMode SelectorMode = "all"
	// FixedMode represents that the system will do the chaos action on a specific number of running objects.
	FixedMode SelectorMode = "fixed"
	// FixedPercentMode to specify a fixed % that can be inject chaos action.
	FixedPercentMode SelectorMode = "fixed-percent"
	// RandomMaxPercentMode to specify a maximum % that can be inject chaos action.
	RandomMaxPercentMode SelectorMode = "random-max-percent"
)

type StatefulObject

type StatefulObject interface {
	GenericChaos
	GetStatus() *ChaosStatus
}

StatefulObject defines a basic Object that can get the status

type StressCPUSpec

type StressCPUSpec struct {
	// specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading.
	Load int `json:"load,omitempty"`
	// specifies N workers to apply the stressor.
	Workers int `json:"workers,omitempty"`
	// extend stress-ng options
	Options string `json:"options,omitempty"`
}

func (*StressCPUSpec) DeepCopy

func (in *StressCPUSpec) DeepCopy() *StressCPUSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressCPUSpec.

func (*StressCPUSpec) DeepCopyInto

func (in *StressCPUSpec) DeepCopyInto(out *StressCPUSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StressChaos

type StressChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a time chaos experiment
	Spec StressChaosSpec `json:"spec"`

	// +optional
	// Most recently observed status of the time chaos experiment
	Status StressChaosStatus `json:"status"`
}

StressChaos is the Schema for the stresschaos API

func (*StressChaos) DeepCopy

func (in *StressChaos) DeepCopy() *StressChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressChaos.

func (*StressChaos) DeepCopyInto

func (in *StressChaos) DeepCopyInto(out *StressChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StressChaos) DeepCopyObject

func (in *StressChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*StressChaos) Default

func (in *StressChaos) Default()

func (*StressChaos) DurationExceeded

func (in *StressChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*StressChaos) GetCustomStatus

func (obj *StressChaos) GetCustomStatus() interface{}

func (*StressChaos) GetObjectMeta

func (in *StressChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*StressChaos) GetSelectorSpecs

func (obj *StressChaos) GetSelectorSpecs() map[string]interface{}

func (*StressChaos) GetSpecAndMetaString

func (in *StressChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*StressChaos) GetStatus

func (in *StressChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*StressChaos) IsDeleted

func (in *StressChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*StressChaos) IsOneShot

func (in *StressChaos) IsOneShot() bool

func (*StressChaos) IsPaused

func (in *StressChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*StressChaos) Validate

func (in *StressChaos) Validate() error

func (*StressChaos) ValidateCreate

func (in *StressChaos) ValidateCreate() error

func (*StressChaos) ValidateDelete

func (in *StressChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*StressChaos) ValidateUpdate

func (in *StressChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type StressChaosList

type StressChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StressChaos `json:"items"`
}

StressChaosList contains a list of StressChaos

func (*StressChaosList) DeepCopy

func (in *StressChaosList) DeepCopy() *StressChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressChaosList.

func (*StressChaosList) DeepCopyInto

func (in *StressChaosList) DeepCopyInto(out *StressChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StressChaosList) DeepCopyList

func (in *StressChaosList) DeepCopyList() GenericChaosList

func (*StressChaosList) DeepCopyObject

func (in *StressChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*StressChaosList) GetItems

func (in *StressChaosList) GetItems() []GenericChaos

func (*StressChaosList) ListChaos

func (in *StressChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type StressChaosSpec

type StressChaosSpec struct {
	ContainerSelector `json:",inline"`

	// Stressors defines plenty of stressors supported to stress system components out.
	// You can use one or more of them to make up various kinds of stresses. At least
	// one of the stressors should be specified.
	// +optional
	Stressors *Stressors `json:"stressors,omitempty"`

	// StressngStressors defines plenty of stressors just like `Stressors` except that it's an experimental
	// feature and more powerful. You can define stressors in `stress-ng` (see also `man stress-ng`) dialect,
	// however not all of the supported stressors are well tested. It maybe retired in later releases. You
	// should always use `Stressors` to define the stressors and use this only when you want more stressors
	// unsupported by `Stressors`. When both `StressngStressors` and `Stressors` are defined, `StressngStressors`
	// wins.
	// +optional
	StressngStressors string `json:"stressngStressors,omitempty"`

	// Duration represents the duration of the chaos action
	// +optional
	Duration *string `json:"duration,omitempty" webhook:"Duration"`
}

StressChaosSpec defines the desired state of StressChaos

func (*StressChaosSpec) DeepCopy

func (in *StressChaosSpec) DeepCopy() *StressChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressChaosSpec.

func (*StressChaosSpec) DeepCopyInto

func (in *StressChaosSpec) DeepCopyInto(out *StressChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StressChaosSpec) GetDuration

func (in *StressChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

func (*StressChaosSpec) Validate

func (in *StressChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList

Validate validates the scheduler and duration

type StressChaosStatus

type StressChaosStatus struct {
	ChaosStatus `json:",inline"`
	// Instances always specifies stressing instances
	// +optional
	Instances map[string]StressInstance `json:"instances,omitempty"`
}

StressChaosStatus defines the observed state of StressChaos

func (*StressChaosStatus) DeepCopy

func (in *StressChaosStatus) DeepCopy() *StressChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressChaosStatus.

func (*StressChaosStatus) DeepCopyInto

func (in *StressChaosStatus) DeepCopyInto(out *StressChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StressInstance

type StressInstance struct {
	// UID is the instance identifier
	// +optional
	UID string `json:"uid"`
	// StartTime specifies when the instance starts
	// +optional
	StartTime *metav1.Time `json:"startTime"`
}

StressInstance is an instance generates stresses

func (*StressInstance) DeepCopy

func (in *StressInstance) DeepCopy() *StressInstance

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressInstance.

func (*StressInstance) DeepCopyInto

func (in *StressInstance) DeepCopyInto(out *StressInstance)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StressMemorySpec

type StressMemorySpec struct {
	// specifies N bytes consumed per vm worker, default is the total available memory.
	// One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB..
	Size string `json:"size,omitempty"`
	// extend stress-ng options
	Options string `json:"options,omitempty"`
}

func (*StressMemorySpec) DeepCopy

func (in *StressMemorySpec) DeepCopy() *StressMemorySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressMemorySpec.

func (*StressMemorySpec) DeepCopyInto

func (in *StressMemorySpec) DeepCopyInto(out *StressMemorySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Stressor

type Stressor struct {
	// Workers specifies N workers to apply the stressor.
	// Maximum 8192 workers can run by stress-ng
	// +kubebuilder:validation:Maximum=8192
	Workers int `json:"workers"`
}

Stressor defines common configurations of a stressor

func (*Stressor) DeepCopy

func (in *Stressor) DeepCopy() *Stressor

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stressor.

func (*Stressor) DeepCopyInto

func (in *Stressor) DeepCopyInto(out *Stressor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Stressor) Validate

func (in *Stressor) Validate(parent *field.Path) field.ErrorList

Validate validates whether the Stressor is well defined

type Stressors

type Stressors struct {
	// MemoryStressor stresses virtual memory out
	// +optional
	MemoryStressor *MemoryStressor `json:"memory,omitempty"`
	// CPUStressor stresses CPU out
	// +optional
	CPUStressor *CPUStressor `json:"cpu,omitempty"`
}

Stressors defines plenty of stressors supported to stress system components out. You can use one or more of them to make up various kinds of stresses

func (*Stressors) DeepCopy

func (in *Stressors) DeepCopy() *Stressors

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stressors.

func (*Stressors) DeepCopyInto

func (in *Stressors) DeepCopyInto(out *Stressors)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Stressors) Normalize

func (in *Stressors) Normalize() (string, error)

Normalize the stressors to comply with stress-ng

func (*Stressors) Validate

func (in *Stressors) Validate(root interface{}, path *field.Path) field.ErrorList

Validate validates whether the Stressors are all well defined

type Task

type Task struct {
	// Container is the main container image to run in the pod
	Container *corev1.Container `json:"container,omitempty"`

	// Volumes is a list of volumes that can be mounted by containers in a template.
	// +patchStrategy=merge
	// +patchMergeKey=name
	Volumes []corev1.Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}

func (*Task) DeepCopy

func (in *Task) DeepCopy() *Task

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.

func (*Task) DeepCopyInto

func (in *Task) DeepCopyInto(out *Task)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TcParameter

type TcParameter struct {
	// Delay represents the detail about delay action
	// +optional
	Delay *DelaySpec `json:"delay,omitempty"`

	// Loss represents the detail about loss action
	// +optional
	Loss *LossSpec `json:"loss,omitempty"`

	// DuplicateSpec represents the detail about loss action
	// +optional
	Duplicate *DuplicateSpec `json:"duplicate,omitempty"`

	// Corrupt represents the detail about corrupt action
	// +optional
	Corrupt *CorruptSpec `json:"corrupt,omitempty"`

	// Bandwidth represents the detail about bandwidth control action
	// +optional
	Bandwidth *BandwidthSpec `json:"bandwidth,omitempty"`
}

TcParameter represents the parameters for a traffic control chaos

func (*TcParameter) DeepCopy

func (in *TcParameter) DeepCopy() *TcParameter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcParameter.

func (*TcParameter) DeepCopyInto

func (in *TcParameter) DeepCopyInto(out *TcParameter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TcType

type TcType string

TcType the type of traffic control

const (
	// Netem represents netem traffic control
	Netem TcType = "netem"

	// Bandwidth represents bandwidth shape traffic control
	Bandwidth TcType = "bandwidth"
)

type Template

type Template struct {
	Name string       `json:"name"`
	Type TemplateType `json:"templateType"`
	// +optional
	Deadline *string `json:"deadline,omitempty"`
	// Task describes the behavior of the custom task. Only used when Type is TypeTask.
	// +optional
	Task *Task `json:"task,omitempty"`
	// Children describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel.
	// +optional
	Children []string `json:"children,omitempty"`
	// ConditionalBranches describes the conditional branches of custom tasks. Only used when Type is TypeTask.
	// +optional
	ConditionalBranches []ConditionalBranch `json:"conditionalBranches,omitempty"`
	// EmbedChaos describe the chaos to be injected with chaos nodes. Only used when Type is Type<Something>Chaos.
	// +optional
	*EmbedChaos `json:",inline"`
	// Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule.
	// +optional
	Schedule *ChaosOnlyScheduleSpec `json:"schedule,omitempty"`
}

func (*Template) DeepCopy

func (in *Template) DeepCopy() *Template

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.

func (*Template) DeepCopyInto

func (in *Template) DeepCopyInto(out *Template)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TemplateType

type TemplateType string
const (
	TypeTask     TemplateType = "Task"
	TypeSerial   TemplateType = "Serial"
	TypeParallel TemplateType = "Parallel"
	TypeSuspend  TemplateType = "Suspend"
	TypeSchedule TemplateType = "Schedule"
)
const (
	TypeAWSChaos             TemplateType = "AWSChaos"
	TypeDNSChaos             TemplateType = "DNSChaos"
	TypeGCPChaos             TemplateType = "GCPChaos"
	TypeHTTPChaos            TemplateType = "HTTPChaos"
	TypeIOChaos              TemplateType = "IOChaos"
	TypeJVMChaos             TemplateType = "JVMChaos"
	TypeKernelChaos          TemplateType = "KernelChaos"
	TypeNetworkChaos         TemplateType = "NetworkChaos"
	TypePhysicalMachineChaos TemplateType = "PhysicalMachineChaos"
	TypePodChaos             TemplateType = "PodChaos"
	TypeStressChaos          TemplateType = "StressChaos"
	TypeTimeChaos            TemplateType = "TimeChaos"
)

type TimeChaos

type TimeChaos struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a time chaos experiment
	Spec TimeChaosSpec `json:"spec"`

	// +optional
	// Most recently observed status of the time chaos experiment
	Status TimeChaosStatus `json:"status"`
}

TimeChaos is the Schema for the timechaos API

func (*TimeChaos) DeepCopy

func (in *TimeChaos) DeepCopy() *TimeChaos

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeChaos.

func (*TimeChaos) DeepCopyInto

func (in *TimeChaos) DeepCopyInto(out *TimeChaos)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TimeChaos) DeepCopyObject

func (in *TimeChaos) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TimeChaos) Default

func (in *TimeChaos) Default()

func (*TimeChaos) DurationExceeded

func (in *TimeChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)

func (*TimeChaos) GetObjectMeta

func (in *TimeChaos) GetObjectMeta() *metav1.ObjectMeta

GetObjectMeta would return the ObjectMeta for chaos

func (*TimeChaos) GetSelectorSpecs

func (in *TimeChaos) GetSelectorSpecs() map[string]interface{}

func (*TimeChaos) GetSpecAndMetaString

func (in *TimeChaos) GetSpecAndMetaString() (string, error)

GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.

func (*TimeChaos) GetStatus

func (in *TimeChaos) GetStatus() *ChaosStatus

GetStatus returns the status

func (*TimeChaos) IsDeleted

func (in *TimeChaos) IsDeleted() bool

IsDeleted returns whether this resource has been deleted

func (*TimeChaos) IsOneShot

func (in *TimeChaos) IsOneShot() bool

func (*TimeChaos) IsPaused

func (in *TimeChaos) IsPaused() bool

IsPaused returns whether this resource has been paused

func (*TimeChaos) Validate

func (in *TimeChaos) Validate() error

func (*TimeChaos) ValidateCreate

func (in *TimeChaos) ValidateCreate() error

func (*TimeChaos) ValidateDelete

func (in *TimeChaos) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*TimeChaos) ValidateUpdate

func (in *TimeChaos) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type TimeChaosList

type TimeChaosList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TimeChaos `json:"items"`
}

TimeChaosList contains a list of TimeChaos

func (*TimeChaosList) DeepCopy

func (in *TimeChaosList) DeepCopy() *TimeChaosList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeChaosList.

func (*TimeChaosList) DeepCopyInto

func (in *TimeChaosList) DeepCopyInto(out *TimeChaosList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TimeChaosList) DeepCopyList

func (in *TimeChaosList) DeepCopyList() GenericChaosList

func (*TimeChaosList) DeepCopyObject

func (in *TimeChaosList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TimeChaosList) GetItems

func (in *TimeChaosList) GetItems() []GenericChaos

func (*TimeChaosList) ListChaos

func (in *TimeChaosList) ListChaos() []GenericChaos

ListChaos returns a list of chaos

type TimeChaosSpec

type TimeChaosSpec struct {
	ContainerSelector `json:",inline"`

	// TimeOffset defines the delta time of injected program. It's a possibly signed sequence of decimal numbers, such as
	// "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
	TimeOffset string `json:"timeOffset" webhook:"TimeOffset"`

	// ClockIds defines all affected clock id
	// All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID",
	// "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM",
	// "CLOCK_BOOTTIME_ALARM"]
	// Default value is ["CLOCK_REALTIME"]
	ClockIds []string `json:"clockIds,omitempty" webhook:"ClockIds,nilable"`

	// Duration represents the duration of the chaos action
	Duration *string `json:"duration,omitempty"`
}

TimeChaosSpec defines the desired state of TimeChaos

func (*TimeChaosSpec) DeepCopy

func (in *TimeChaosSpec) DeepCopy() *TimeChaosSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeChaosSpec.

func (*TimeChaosSpec) DeepCopyInto

func (in *TimeChaosSpec) DeepCopyInto(out *TimeChaosSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TimeChaosSpec) GetDuration

func (in *TimeChaosSpec) GetDuration() (*time.Duration, error)

GetDuration would return the duration for chaos

type TimeChaosStatus

type TimeChaosStatus struct {
	ChaosStatus `json:",inline"`
}

TimeChaosStatus defines the observed state of TimeChaos

func (*TimeChaosStatus) DeepCopy

func (in *TimeChaosStatus) DeepCopy() *TimeChaosStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeChaosStatus.

func (*TimeChaosStatus) DeepCopyInto

func (in *TimeChaosStatus) DeepCopyInto(out *TimeChaosStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TimeOffset

type TimeOffset string

func (*TimeOffset) Validate

func (in *TimeOffset) Validate(root interface{}, path *field.Path) field.ErrorList

type Timespec

type Timespec struct {
	Sec  int64 `json:"sec"`
	Nsec int64 `json:"nsec"`
}

Timespec represents a time

func (*Timespec) DeepCopy

func (in *Timespec) DeepCopy() *Timespec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timespec.

func (*Timespec) DeepCopyInto

func (in *Timespec) DeepCopyInto(out *Timespec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Workflow

type Workflow struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a workflow
	Spec WorkflowSpec `json:"spec"`

	// +optional
	// Most recently observed status of the workflow
	Status WorkflowStatus `json:"status"`
}

+kubebuilder:object:root=true +kubebuilder:resource:shortName=wf +kubebuilder:subresource:status +chaos-mesh:experiment

func (*Workflow) DeepCopy

func (in *Workflow) DeepCopy() *Workflow

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.

func (*Workflow) DeepCopyInto

func (in *Workflow) DeepCopyInto(out *Workflow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Workflow) DeepCopyObject

func (in *Workflow) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Workflow) GetObjectMeta

func (in *Workflow) GetObjectMeta() *metav1.ObjectMeta

func (*Workflow) ValidateCreate

func (in *Workflow) ValidateCreate() error

func (*Workflow) ValidateDelete

func (in *Workflow) ValidateDelete() error

func (*Workflow) ValidateUpdate

func (in *Workflow) ValidateUpdate(old runtime.Object) error

type WorkflowCondition

type WorkflowCondition struct {
	Type      WorkflowConditionType  `json:"type"`
	Status    corev1.ConditionStatus `json:"status"`
	Reason    string                 `json:"reason"`
	StartTime *metav1.Time           `json:"startTime,omitempty"`
}

func (*WorkflowCondition) DeepCopy

func (in *WorkflowCondition) DeepCopy() *WorkflowCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowCondition.

func (*WorkflowCondition) DeepCopyInto

func (in *WorkflowCondition) DeepCopyInto(out *WorkflowCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkflowConditionType

type WorkflowConditionType string
const (
	WorkflowConditionAccomplished WorkflowConditionType = "Accomplished"
	WorkflowConditionScheduled    WorkflowConditionType = "Scheduled"
)

type WorkflowList

type WorkflowList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Workflow `json:"items"`
}

+kubebuilder:object:root=true

func (*WorkflowList) DeepCopy

func (in *WorkflowList) DeepCopy() *WorkflowList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowList.

func (*WorkflowList) DeepCopyInto

func (in *WorkflowList) DeepCopyInto(out *WorkflowList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkflowList) DeepCopyList

func (in *WorkflowList) DeepCopyList() GenericChaosList

TODO: refactor: not so accurate

func (*WorkflowList) DeepCopyObject

func (in *WorkflowList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*WorkflowList) GetItems

func (in *WorkflowList) GetItems() []GenericChaos

type WorkflowNode

type WorkflowNode struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a node of workflow
	Spec WorkflowNodeSpec `json:"spec"`

	// +optional
	// Most recently observed status of the workflow node
	Status WorkflowNodeStatus `json:"status"`
}

+kubebuilder:object:root=true +kubebuilder:resource:shortName=wfn +kubebuilder:subresource:status

func (*WorkflowNode) DeepCopy

func (in *WorkflowNode) DeepCopy() *WorkflowNode

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNode.

func (*WorkflowNode) DeepCopyInto

func (in *WorkflowNode) DeepCopyInto(out *WorkflowNode)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkflowNode) DeepCopyObject

func (in *WorkflowNode) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkflowNodeCondition

type WorkflowNodeCondition struct {
	Type   WorkflowNodeConditionType `json:"type"`
	Status corev1.ConditionStatus    `json:"status"`
	Reason string                    `json:"reason"`
}

func (*WorkflowNodeCondition) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeCondition.

func (*WorkflowNodeCondition) DeepCopyInto

func (in *WorkflowNodeCondition) DeepCopyInto(out *WorkflowNodeCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkflowNodeConditionType

type WorkflowNodeConditionType string
const (
	ConditionAccomplished   WorkflowNodeConditionType = "Accomplished"
	ConditionDeadlineExceed WorkflowNodeConditionType = "DeadlineExceed"
	ConditionChaosInjected  WorkflowNodeConditionType = "ChaosInjected"
)

type WorkflowNodeList

type WorkflowNodeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []WorkflowNode `json:"items"`
}

+kubebuilder:object:root=true

func (*WorkflowNodeList) DeepCopy

func (in *WorkflowNodeList) DeepCopy() *WorkflowNodeList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeList.

func (*WorkflowNodeList) DeepCopyInto

func (in *WorkflowNodeList) DeepCopyInto(out *WorkflowNodeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkflowNodeList) DeepCopyObject

func (in *WorkflowNodeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type WorkflowNodeSpec

type WorkflowNodeSpec struct {
	TemplateName string       `json:"templateName"`
	WorkflowName string       `json:"workflowName"`
	Type         TemplateType `json:"type"`
	StartTime    *metav1.Time `json:"startTime"`
	// +optional
	Deadline *metav1.Time `json:"deadline,omitempty"`
	// +optional
	Task *Task `json:"task,omitempty"`
	// +optional
	Children []string `json:"children,omitempty"`
	// +optional
	ConditionalBranches []ConditionalBranch `json:"conditionalBranches,omitempty"`
	// +optional
	*EmbedChaos `json:",inline,omitempty"`
	// +optional
	Schedule *ScheduleSpec `json:"schedule,omitempty"`
}

func (*WorkflowNodeSpec) DeepCopy

func (in *WorkflowNodeSpec) DeepCopy() *WorkflowNodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeSpec.

func (*WorkflowNodeSpec) DeepCopyInto

func (in *WorkflowNodeSpec) DeepCopyInto(out *WorkflowNodeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkflowNodeStatus

type WorkflowNodeStatus struct {

	// ChaosResource refs to the real chaos CR object.
	// +optional
	ChaosResource *corev1.TypedLocalObjectReference `json:"chaosResource,omitempty"`

	// ConditionalBranchesStatus records the evaluation result of each ConditionalBranch
	// +optional
	ConditionalBranchesStatus *ConditionalBranchesStatus `json:"conditionalBranchesStatus,omitempty"`

	// ActiveChildren means the created children node
	// +optional
	ActiveChildren []corev1.LocalObjectReference `json:"activeChildren,omitempty"`

	// Children is necessary for representing the order when replicated child template references by parent template.
	// +optional
	FinishedChildren []corev1.LocalObjectReference `json:"finishedChildren,omitempty"`

	// Represents the latest available observations of a workflow node's current state.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []WorkflowNodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

func (*WorkflowNodeStatus) DeepCopy

func (in *WorkflowNodeStatus) DeepCopy() *WorkflowNodeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeStatus.

func (*WorkflowNodeStatus) DeepCopyInto

func (in *WorkflowNodeStatus) DeepCopyInto(out *WorkflowNodeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkflowSpec

type WorkflowSpec struct {
	Entry     string     `json:"entry"`
	Templates []Template `json:"templates"`
}

func (*WorkflowSpec) DeepCopy

func (in *WorkflowSpec) DeepCopy() *WorkflowSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSpec.

func (*WorkflowSpec) DeepCopyInto

func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WorkflowStatus

type WorkflowStatus struct {
	// +optional
	EntryNode *string `json:"entryNode,omitempty"`
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`
	// +optional
	EndTime *metav1.Time `json:"endTime,omitempty"`
	// Represents the latest available observations of a workflow's current state.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []WorkflowCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

func (*WorkflowStatus) DeepCopy

func (in *WorkflowStatus) DeepCopy() *WorkflowStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus.

func (*WorkflowStatus) DeepCopyInto

func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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