Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the chaosmesh v1alpha1 API group +kubebuilder:object:generate=true +groupName=chaos-mesh.org
Index ¶
- Constants
- Variables
- func AllKinds() map[string]*ChaosKind
- func AllKindsIncludeScheduleAndWorkflow() map[string]*ChaosKind
- func AllScheduleItemKinds() map[string]*ChaosKind
- func CheckPercent(p string, allowZero bool) bool
- func CheckPid(pid int) error
- func ConvertUnitToBytes(nu string) (uint64, error)
- func FetchChaosByTemplateType(templateType TemplateType) (runtime.Object, error)
- func IsChaosTemplateType(target TemplateType) bool
- func ParseUnit(s string) (uint64, error)
- func RegisterPodHttpHandler(newHandler PodHttpChaosHandler)
- type AWSChaos
- func (in *AWSChaos) DeepCopy() *AWSChaos
- func (in *AWSChaos) DeepCopyInto(out *AWSChaos)
- func (in *AWSChaos) DeepCopyObject() runtime.Object
- func (in *AWSChaos) Default()
- func (in *AWSChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (in *AWSChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *AWSChaos) GetSelectorSpecs() map[string]interface{}
- func (in *AWSChaos) GetSpecAndMetaString() (string, error)
- func (in *AWSChaos) GetStatus() *ChaosStatus
- func (in *AWSChaos) IsDeleted() bool
- func (in *AWSChaos) IsOneShot() bool
- func (in *AWSChaos) IsPaused() bool
- func (in *AWSChaos) Validate() error
- func (in *AWSChaos) ValidateCreate() error
- func (in *AWSChaos) ValidateDelete() error
- func (in *AWSChaos) ValidateUpdate(old runtime.Object) error
- type AWSChaosAction
- type AWSChaosList
- func (in *AWSChaosList) DeepCopy() *AWSChaosList
- func (in *AWSChaosList) DeepCopyInto(out *AWSChaosList)
- func (in *AWSChaosList) DeepCopyList() GenericChaosList
- func (in *AWSChaosList) DeepCopyObject() runtime.Object
- func (in *AWSChaosList) GetItems() []GenericChaos
- func (in *AWSChaosList) ListChaos() []GenericChaos
- type AWSChaosSpec
- type AWSChaosStatus
- type AWSDeviceName
- type AWSSelector
- type AttrOverrideSpec
- type BandwidthSpec
- type BlockChaos
- func (in *BlockChaos) DeepCopy() *BlockChaos
- func (in *BlockChaos) DeepCopyInto(out *BlockChaos)
- func (in *BlockChaos) DeepCopyObject() runtime.Object
- func (in *BlockChaos) Default()
- func (in *BlockChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (obj *BlockChaos) GetCustomStatus() interface{}
- func (in *BlockChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *BlockChaos) GetSelectorSpecs() map[string]interface{}
- func (in *BlockChaos) GetSpecAndMetaString() (string, error)
- func (in *BlockChaos) GetStatus() *ChaosStatus
- func (in *BlockChaos) IsDeleted() bool
- func (in *BlockChaos) IsOneShot() bool
- func (in *BlockChaos) IsPaused() bool
- func (in *BlockChaos) Validate() error
- func (in *BlockChaos) ValidateCreate() error
- func (in *BlockChaos) ValidateDelete() error
- func (in *BlockChaos) ValidateUpdate(old runtime.Object) error
- type BlockChaosAction
- type BlockChaosList
- func (in *BlockChaosList) DeepCopy() *BlockChaosList
- func (in *BlockChaosList) DeepCopyInto(out *BlockChaosList)
- func (in *BlockChaosList) DeepCopyList() GenericChaosList
- func (in *BlockChaosList) DeepCopyObject() runtime.Object
- func (in *BlockChaosList) GetItems() []GenericChaos
- func (in *BlockChaosList) ListChaos() []GenericChaos
- type BlockChaosSpec
- type BlockChaosStatus
- type BlockDelaySpec
- type Bytes
- type CPUStressor
- type ChainDirection
- type ChaosCondition
- type ChaosConditionType
- type ChaosKind
- type ChaosOnlyScheduleSpec
- type ChaosStatus
- type ClockIds
- type ClockSpec
- type ConcurrencyPolicy
- type ConditionalBranch
- type ConditionalBranchStatus
- type ConditionalBranchesStatus
- type ContainerNodeVolumePathSelector
- type ContainerSelector
- type ContainsDuration
- type CorruptSpec
- type DNSChaos
- func (in *DNSChaos) DeepCopy() *DNSChaos
- func (in *DNSChaos) DeepCopyInto(out *DNSChaos)
- func (in *DNSChaos) DeepCopyObject() runtime.Object
- func (in *DNSChaos) Default()
- func (in *DNSChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (in *DNSChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *DNSChaos) GetSelectorSpecs() map[string]interface{}
- func (in *DNSChaos) GetSpecAndMetaString() (string, error)
- func (in *DNSChaos) GetStatus() *ChaosStatus
- func (in *DNSChaos) IsDeleted() bool
- func (in *DNSChaos) IsOneShot() bool
- func (in *DNSChaos) IsPaused() bool
- func (in *DNSChaos) Validate() error
- func (in *DNSChaos) ValidateCreate() error
- func (in *DNSChaos) ValidateDelete() error
- func (in *DNSChaos) ValidateUpdate(old runtime.Object) error
- type DNSChaosAction
- type DNSChaosList
- func (in *DNSChaosList) DeepCopy() *DNSChaosList
- func (in *DNSChaosList) DeepCopyInto(out *DNSChaosList)
- func (in *DNSChaosList) DeepCopyList() GenericChaosList
- func (in *DNSChaosList) DeepCopyObject() runtime.Object
- func (in *DNSChaosList) GetItems() []GenericChaos
- func (in *DNSChaosList) ListChaos() []GenericChaos
- type DNSChaosSpec
- type DNSChaosStatus
- type DelaySpec
- type DesiredPhase
- type Direction
- type DiskFileSpec
- type DiskFillSpec
- type DiskPayloadSpec
- type DuplicateSpec
- type Duration
- type EbsVolume
- type EmbedChaos
- func (in *EmbedChaos) DeepCopy() *EmbedChaos
- func (in *EmbedChaos) DeepCopyInto(out *EmbedChaos)
- func (it *EmbedChaos) RestoreChaosSpec(root interface{}) error
- func (it *EmbedChaos) SpawnNewList(templateType TemplateType) (GenericChaosList, error)
- func (it *EmbedChaos) SpawnNewObject(templateType TemplateType) (GenericChaos, error)
- func (in EmbedChaos) Validate(path *field.Path, chaosType string) field.ErrorList
- type ExpInfo
- type ExperimentStatus
- type FailKernRequest
- type FileType
- type FillingType
- type Filter
- type FloatStr
- type Frame
- type GCPChaos
- func (in *GCPChaos) DeepCopy() *GCPChaos
- func (in *GCPChaos) DeepCopyInto(out *GCPChaos)
- func (in *GCPChaos) DeepCopyObject() runtime.Object
- func (in *GCPChaos) Default()
- func (in *GCPChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (obj *GCPChaos) GetCustomStatus() interface{}
- func (in *GCPChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *GCPChaos) GetSelectorSpecs() map[string]interface{}
- func (in *GCPChaos) GetSpecAndMetaString() (string, error)
- func (in *GCPChaos) GetStatus() *ChaosStatus
- func (in *GCPChaos) IsDeleted() bool
- func (in *GCPChaos) IsOneShot() bool
- func (in *GCPChaos) IsPaused() bool
- func (in *GCPChaos) Validate() error
- func (in *GCPChaos) ValidateCreate() error
- func (in *GCPChaos) ValidateDelete() error
- func (in *GCPChaos) ValidateUpdate(old runtime.Object) error
- type GCPChaosAction
- type GCPChaosList
- func (in *GCPChaosList) DeepCopy() *GCPChaosList
- func (in *GCPChaosList) DeepCopyInto(out *GCPChaosList)
- func (in *GCPChaosList) DeepCopyList() GenericChaosList
- func (in *GCPChaosList) DeepCopyObject() runtime.Object
- func (in *GCPChaosList) GetItems() []GenericChaos
- func (in *GCPChaosList) ListChaos() []GenericChaos
- type GCPChaosSpec
- type GCPChaosStatus
- type GCPDeviceNames
- type GCPSelector
- type GenericChaos
- type GenericChaosList
- type GenericSelectorSpec
- type HTTPChaos
- func (in *HTTPChaos) DeepCopy() *HTTPChaos
- func (in *HTTPChaos) DeepCopyInto(out *HTTPChaos)
- func (in *HTTPChaos) DeepCopyObject() runtime.Object
- func (in *HTTPChaos) Default()
- func (in *HTTPChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (obj *HTTPChaos) GetCustomStatus() interface{}
- func (in *HTTPChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *HTTPChaos) GetSelectorSpecs() map[string]interface{}
- func (in *HTTPChaos) GetSpecAndMetaString() (string, error)
- func (in *HTTPChaos) GetStatus() *ChaosStatus
- func (in *HTTPChaos) IsDeleted() bool
- func (in *HTTPChaos) IsOneShot() bool
- func (in *HTTPChaos) IsPaused() bool
- func (in *HTTPChaos) Validate() error
- func (in *HTTPChaos) ValidateCreate() error
- func (in *HTTPChaos) ValidateDelete() error
- func (in *HTTPChaos) ValidateUpdate(old runtime.Object) error
- type HTTPChaosList
- func (in *HTTPChaosList) DeepCopy() *HTTPChaosList
- func (in *HTTPChaosList) DeepCopyInto(out *HTTPChaosList)
- func (in *HTTPChaosList) DeepCopyList() GenericChaosList
- func (in *HTTPChaosList) DeepCopyObject() runtime.Object
- func (in *HTTPChaosList) GetItems() []GenericChaos
- func (in *HTTPChaosList) ListChaos() []GenericChaos
- type HTTPChaosSpec
- type HTTPChaosStatus
- type HTTPMethod
- type IOChaos
- func (in *IOChaos) DeepCopy() *IOChaos
- func (in *IOChaos) DeepCopyInto(out *IOChaos)
- func (in *IOChaos) DeepCopyObject() runtime.Object
- func (in *IOChaos) Default()
- func (in *IOChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (obj *IOChaos) GetCustomStatus() interface{}
- func (in *IOChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *IOChaos) GetSelectorSpecs() map[string]interface{}
- func (in *IOChaos) GetSpecAndMetaString() (string, error)
- func (in *IOChaos) GetStatus() *ChaosStatus
- func (in *IOChaos) IsDeleted() bool
- func (in *IOChaos) IsOneShot() bool
- func (in *IOChaos) IsPaused() bool
- func (in *IOChaos) Validate() error
- func (in *IOChaos) ValidateCreate() error
- func (in *IOChaos) ValidateDelete() error
- func (in *IOChaos) ValidateUpdate(old runtime.Object) error
- type IOChaosAction
- type IOChaosList
- func (in *IOChaosList) DeepCopy() *IOChaosList
- func (in *IOChaosList) DeepCopyInto(out *IOChaosList)
- func (in *IOChaosList) DeepCopyList() GenericChaosList
- func (in *IOChaosList) DeepCopyObject() runtime.Object
- func (in *IOChaosList) GetItems() []GenericChaos
- func (in *IOChaosList) ListChaos() []GenericChaos
- type IOChaosSpec
- type IOChaosStatus
- type IOChaosType
- type IOErrno
- type InnerObject
- type InnerObjectWithCustomStatus
- type InnerObjectWithSelector
- type IoFault
- type IoMethod
- type JVMChaos
- func (in *JVMChaos) DeepCopy() *JVMChaos
- func (in *JVMChaos) DeepCopyInto(out *JVMChaos)
- func (in *JVMChaos) DeepCopyObject() runtime.Object
- func (in *JVMChaos) Default()
- func (in *JVMChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (in *JVMChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *JVMChaos) GetSelectorSpecs() map[string]interface{}
- func (in *JVMChaos) GetSpecAndMetaString() (string, error)
- func (in *JVMChaos) GetStatus() *ChaosStatus
- func (in *JVMChaos) IsDeleted() bool
- func (in *JVMChaos) IsOneShot() bool
- func (in *JVMChaos) IsPaused() bool
- func (in *JVMChaos) Validate() error
- func (in *JVMChaos) ValidateCreate() error
- func (in *JVMChaos) ValidateDelete() error
- func (in *JVMChaos) ValidateUpdate(old runtime.Object) error
- type JVMChaosAction
- type JVMChaosList
- func (in *JVMChaosList) DeepCopy() *JVMChaosList
- func (in *JVMChaosList) DeepCopyInto(out *JVMChaosList)
- func (in *JVMChaosList) DeepCopyList() GenericChaosList
- func (in *JVMChaosList) DeepCopyObject() runtime.Object
- func (in *JVMChaosList) GetItems() []GenericChaos
- func (in *JVMChaosList) ListChaos() []GenericChaos
- type JVMChaosSpec
- func (in *JVMChaosSpec) DeepCopy() *JVMChaosSpec
- func (in *JVMChaosSpec) DeepCopyInto(out *JVMChaosSpec)
- func (in *JVMChaosSpec) Default(root interface{}, field *reflect.StructField)
- func (in *JVMChaosSpec) GetDuration() (*time.Duration, error)
- func (in *JVMChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList
- type JVMChaosStatus
- type JVMClassMethodSpec
- type JVMCommonSpec
- type JVMExceptionSpec
- type JVMGCSpec
- type JVMLatencySpec
- type JVMParameter
- type JVMReturnSpec
- type JVMRuleDataSpec
- type JVMStressSpec
- type KernelChaos
- func (in *KernelChaos) DeepCopy() *KernelChaos
- func (in *KernelChaos) DeepCopyInto(out *KernelChaos)
- func (in *KernelChaos) DeepCopyObject() runtime.Object
- func (in *KernelChaos) Default()
- func (in *KernelChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (in *KernelChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *KernelChaos) GetSelectorSpecs() map[string]interface{}
- func (in *KernelChaos) GetSpecAndMetaString() (string, error)
- func (in *KernelChaos) GetStatus() *ChaosStatus
- func (in *KernelChaos) IsDeleted() bool
- func (in *KernelChaos) IsOneShot() bool
- func (in *KernelChaos) IsPaused() bool
- func (in *KernelChaos) Validate() error
- func (in *KernelChaos) ValidateCreate() error
- func (in *KernelChaos) ValidateDelete() error
- func (in *KernelChaos) ValidateUpdate(old runtime.Object) error
- type KernelChaosList
- func (in *KernelChaosList) DeepCopy() *KernelChaosList
- func (in *KernelChaosList) DeepCopyInto(out *KernelChaosList)
- func (in *KernelChaosList) DeepCopyList() GenericChaosList
- func (in *KernelChaosList) DeepCopyObject() runtime.Object
- func (in *KernelChaosList) GetItems() []GenericChaos
- func (in *KernelChaosList) ListChaos() []GenericChaos
- type KernelChaosSpec
- type KernelChaosStatus
- type LabelSelectorRequirements
- type LossSpec
- type MemoryStressor
- type MistakeSpec
- type NetworkBandwidthSpec
- type NetworkChaos
- func (in *NetworkChaos) DeepCopy() *NetworkChaos
- func (in *NetworkChaos) DeepCopyInto(out *NetworkChaos)
- func (in *NetworkChaos) DeepCopyObject() runtime.Object
- func (in *NetworkChaos) Default()
- func (in *NetworkChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (obj *NetworkChaos) GetCustomStatus() interface{}
- func (in *NetworkChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *NetworkChaos) GetSelectorSpecs() map[string]interface{}
- func (in *NetworkChaos) GetSpecAndMetaString() (string, error)
- func (in *NetworkChaos) GetStatus() *ChaosStatus
- func (in *NetworkChaos) IsDeleted() bool
- func (in *NetworkChaos) IsOneShot() bool
- func (in *NetworkChaos) IsPaused() bool
- func (in *NetworkChaos) Validate() error
- func (in *NetworkChaos) ValidateCreate() error
- func (in *NetworkChaos) ValidateDelete() error
- func (in *NetworkChaos) ValidateUpdate(old runtime.Object) error
- type NetworkChaosAction
- type NetworkChaosList
- func (in *NetworkChaosList) DeepCopy() *NetworkChaosList
- func (in *NetworkChaosList) DeepCopyInto(out *NetworkChaosList)
- func (in *NetworkChaosList) DeepCopyList() GenericChaosList
- func (in *NetworkChaosList) DeepCopyObject() runtime.Object
- func (in *NetworkChaosList) GetItems() []GenericChaos
- func (in *NetworkChaosList) ListChaos() []GenericChaos
- type NetworkChaosSpec
- type NetworkChaosStatus
- type NetworkCommonSpec
- type NetworkCorruptSpec
- type NetworkDNSSpec
- type NetworkDelaySpec
- type NetworkDuplicateSpec
- type NetworkLossSpec
- type NetworkPartitionSpec
- type Percent
- type Phase
- type PhysicalMachine
- func (in *PhysicalMachine) DeepCopy() *PhysicalMachine
- func (in *PhysicalMachine) DeepCopyInto(out *PhysicalMachine)
- func (in *PhysicalMachine) DeepCopyObject() runtime.Object
- func (in *PhysicalMachine) Default()
- func (in *PhysicalMachine) Validate() error
- func (in *PhysicalMachine) ValidateCreate() error
- func (in *PhysicalMachine) ValidateDelete() error
- func (in *PhysicalMachine) ValidateUpdate(old runtime.Object) error
- type PhysicalMachineChaos
- func (in *PhysicalMachineChaos) DeepCopy() *PhysicalMachineChaos
- func (in *PhysicalMachineChaos) DeepCopyInto(out *PhysicalMachineChaos)
- func (in *PhysicalMachineChaos) DeepCopyObject() runtime.Object
- func (in *PhysicalMachineChaos) Default()
- func (in *PhysicalMachineChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (in *PhysicalMachineChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *PhysicalMachineChaos) GetSelectorSpecs() map[string]interface{}
- func (in *PhysicalMachineChaos) GetSpecAndMetaString() (string, error)
- func (in *PhysicalMachineChaos) GetStatus() *ChaosStatus
- func (in *PhysicalMachineChaos) IsDeleted() bool
- func (in *PhysicalMachineChaos) IsOneShot() bool
- func (in *PhysicalMachineChaos) IsPaused() bool
- func (in *PhysicalMachineChaos) Validate() error
- func (in *PhysicalMachineChaos) ValidateCreate() error
- func (in *PhysicalMachineChaos) ValidateDelete() error
- func (in *PhysicalMachineChaos) ValidateUpdate(old runtime.Object) error
- type PhysicalMachineChaosAction
- type PhysicalMachineChaosList
- func (in *PhysicalMachineChaosList) DeepCopy() *PhysicalMachineChaosList
- func (in *PhysicalMachineChaosList) DeepCopyInto(out *PhysicalMachineChaosList)
- func (in *PhysicalMachineChaosList) DeepCopyList() GenericChaosList
- func (in *PhysicalMachineChaosList) DeepCopyObject() runtime.Object
- func (in *PhysicalMachineChaosList) GetItems() []GenericChaos
- func (in *PhysicalMachineChaosList) ListChaos() []GenericChaos
- type PhysicalMachineChaosSpec
- func (in *PhysicalMachineChaosSpec) DeepCopy() *PhysicalMachineChaosSpec
- func (in *PhysicalMachineChaosSpec) DeepCopyInto(out *PhysicalMachineChaosSpec)
- func (in *PhysicalMachineChaosSpec) Default(root interface{}, field *reflect.StructField)
- func (in *PhysicalMachineChaosSpec) GetDuration() (*time.Duration, error)
- func (in *PhysicalMachineChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList
- type PhysicalMachineChaosStatus
- type PhysicalMachineList
- type PhysicalMachineSelector
- type PhysicalMachineSelectorSpec
- type PhysicalMachineSpec
- func (in *PhysicalMachineSpec) DeepCopy() *PhysicalMachineSpec
- func (in *PhysicalMachineSpec) DeepCopyInto(out *PhysicalMachineSpec)
- func (in *PhysicalMachineSpec) Default(root interface{}, field *reflect.StructField)
- func (in *PhysicalMachineSpec) Validate(root interface{}, path *field.Path) field.ErrorList
- type PodChaos
- func (in *PodChaos) DeepCopy() *PodChaos
- func (in *PodChaos) DeepCopyInto(out *PodChaos)
- func (in *PodChaos) DeepCopyObject() runtime.Object
- func (in *PodChaos) Default()
- func (in *PodChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (in *PodChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *PodChaos) GetSelectorSpecs() map[string]interface{}
- func (in *PodChaos) GetSpecAndMetaString() (string, error)
- func (in *PodChaos) GetStatus() *ChaosStatus
- func (in *PodChaos) IsDeleted() bool
- func (in *PodChaos) IsOneShot() bool
- func (in *PodChaos) IsPaused() bool
- func (in *PodChaos) Validate() error
- func (in *PodChaos) ValidateCreate() error
- func (in *PodChaos) ValidateDelete() error
- func (in *PodChaos) ValidateUpdate(old runtime.Object) error
- type PodChaosAction
- type PodChaosList
- func (in *PodChaosList) DeepCopy() *PodChaosList
- func (in *PodChaosList) DeepCopyInto(out *PodChaosList)
- func (in *PodChaosList) DeepCopyList() GenericChaosList
- func (in *PodChaosList) DeepCopyObject() runtime.Object
- func (in *PodChaosList) GetItems() []GenericChaos
- func (in *PodChaosList) ListChaos() []GenericChaos
- type PodChaosSpec
- type PodChaosStatus
- type PodHttpChaos
- func (in *PodHttpChaos) DeepCopy() *PodHttpChaos
- func (in *PodHttpChaos) DeepCopyInto(out *PodHttpChaos)
- func (in *PodHttpChaos) DeepCopyObject() runtime.Object
- func (in *PodHttpChaos) Default()
- func (in *PodHttpChaos) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (in *PodHttpChaos) Validate() error
- func (in *PodHttpChaos) ValidateCreate() error
- func (in *PodHttpChaos) ValidateDelete() error
- func (in *PodHttpChaos) ValidateUpdate(old runtime.Object) error
- type PodHttpChaosActions
- type PodHttpChaosBaseRule
- type PodHttpChaosHandler
- type PodHttpChaosList
- type PodHttpChaosPatchActions
- type PodHttpChaosPatchBodyAction
- type PodHttpChaosReplaceActions
- type PodHttpChaosRule
- type PodHttpChaosSelector
- type PodHttpChaosSpec
- type PodHttpChaosStatus
- type PodHttpChaosTarget
- type PodHttpChaosWebhookRunner
- type PodIOChaos
- func (in *PodIOChaos) DeepCopy() *PodIOChaos
- func (in *PodIOChaos) DeepCopyInto(out *PodIOChaos)
- func (in *PodIOChaos) DeepCopyObject() runtime.Object
- func (in *PodIOChaos) Default()
- func (in *PodIOChaos) Validate() error
- func (in *PodIOChaos) ValidateCreate() error
- func (in *PodIOChaos) ValidateDelete() error
- func (in *PodIOChaos) ValidateUpdate(old runtime.Object) error
- type PodIOChaosList
- type PodIOChaosSpec
- type PodIOChaosStatus
- type PodNetworkChaos
- func (in *PodNetworkChaos) DeepCopy() *PodNetworkChaos
- func (in *PodNetworkChaos) DeepCopyInto(out *PodNetworkChaos)
- func (in *PodNetworkChaos) DeepCopyObject() runtime.Object
- func (in *PodNetworkChaos) Default()
- func (in *PodNetworkChaos) Validate() error
- func (in *PodNetworkChaos) ValidateCreate() error
- func (in *PodNetworkChaos) ValidateDelete() error
- func (in *PodNetworkChaos) ValidateUpdate(old runtime.Object) error
- type PodNetworkChaosList
- type PodNetworkChaosSpec
- type PodNetworkChaosStatus
- type PodSelector
- type PodSelectorSpec
- type Port
- type ProcessSpec
- type Rate
- type RawIPSet
- type RawIptables
- type RawRuleSource
- type RawTrafficControl
- type Record
- type ReorderSpec
- type Schedule
- func (in *Schedule) DeepCopy() *Schedule
- func (in *Schedule) DeepCopyInto(out *Schedule)
- func (in *Schedule) DeepCopyObject() runtime.Object
- func (in *Schedule) Default()
- func (in *Schedule) IsPaused() bool
- func (in *Schedule) Validate() error
- func (in *Schedule) ValidateCreate() error
- func (in *Schedule) ValidateDelete() error
- func (in *Schedule) ValidateUpdate(old runtime.Object) error
- type ScheduleItem
- type ScheduleList
- type ScheduleSpec
- type ScheduleStatus
- type ScheduleTemplateType
- type SelectorMode
- type StatefulObject
- type StressCPUSpec
- type StressChaos
- func (in *StressChaos) DeepCopy() *StressChaos
- func (in *StressChaos) DeepCopyInto(out *StressChaos)
- func (in *StressChaos) DeepCopyObject() runtime.Object
- func (in *StressChaos) Default()
- func (in *StressChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (obj *StressChaos) GetCustomStatus() interface{}
- func (in *StressChaos) GetObjectMeta() *metav1.ObjectMeta
- func (obj *StressChaos) GetSelectorSpecs() map[string]interface{}
- func (in *StressChaos) GetSpecAndMetaString() (string, error)
- func (in *StressChaos) GetStatus() *ChaosStatus
- func (in *StressChaos) IsDeleted() bool
- func (in *StressChaos) IsOneShot() bool
- func (in *StressChaos) IsPaused() bool
- func (in *StressChaos) Validate() error
- func (in *StressChaos) ValidateCreate() error
- func (in *StressChaos) ValidateDelete() error
- func (in *StressChaos) ValidateUpdate(old runtime.Object) error
- type StressChaosList
- func (in *StressChaosList) DeepCopy() *StressChaosList
- func (in *StressChaosList) DeepCopyInto(out *StressChaosList)
- func (in *StressChaosList) DeepCopyList() GenericChaosList
- func (in *StressChaosList) DeepCopyObject() runtime.Object
- func (in *StressChaosList) GetItems() []GenericChaos
- func (in *StressChaosList) ListChaos() []GenericChaos
- type StressChaosSpec
- type StressChaosStatus
- type StressInstance
- type StressMemorySpec
- type Stressor
- type Stressors
- type Task
- type TcParameter
- type TcType
- type Template
- type TemplateType
- type TimeChaos
- func (in *TimeChaos) DeepCopy() *TimeChaos
- func (in *TimeChaos) DeepCopyInto(out *TimeChaos)
- func (in *TimeChaos) DeepCopyObject() runtime.Object
- func (in *TimeChaos) Default()
- func (in *TimeChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
- func (in *TimeChaos) GetObjectMeta() *metav1.ObjectMeta
- func (in *TimeChaos) GetSelectorSpecs() map[string]interface{}
- func (in *TimeChaos) GetSpecAndMetaString() (string, error)
- func (in *TimeChaos) GetStatus() *ChaosStatus
- func (in *TimeChaos) IsDeleted() bool
- func (in *TimeChaos) IsOneShot() bool
- func (in *TimeChaos) IsPaused() bool
- func (in *TimeChaos) Validate() error
- func (in *TimeChaos) ValidateCreate() error
- func (in *TimeChaos) ValidateDelete() error
- func (in *TimeChaos) ValidateUpdate(old runtime.Object) error
- type TimeChaosList
- func (in *TimeChaosList) DeepCopy() *TimeChaosList
- func (in *TimeChaosList) DeepCopyInto(out *TimeChaosList)
- func (in *TimeChaosList) DeepCopyList() GenericChaosList
- func (in *TimeChaosList) DeepCopyObject() runtime.Object
- func (in *TimeChaosList) GetItems() []GenericChaos
- func (in *TimeChaosList) ListChaos() []GenericChaos
- type TimeChaosSpec
- type TimeChaosStatus
- type TimeOffset
- type Timespec
- type WebhookObject
- type Workflow
- func (in *Workflow) DeepCopy() *Workflow
- func (in *Workflow) DeepCopyInto(out *Workflow)
- func (in *Workflow) DeepCopyObject() runtime.Object
- func (in *Workflow) Default()
- func (in *Workflow) GetObjectMeta() *metav1.ObjectMeta
- func (in *Workflow) ValidateCreate() error
- func (in *Workflow) ValidateDelete() error
- func (in *Workflow) ValidateUpdate(old runtime.Object) error
- type WorkflowCondition
- type WorkflowConditionType
- type WorkflowList
- type WorkflowNode
- type WorkflowNodeCondition
- type WorkflowNodeConditionType
- type WorkflowNodeList
- type WorkflowNodeSpec
- type WorkflowNodeStatus
- type WorkflowSpec
- type WorkflowStatus
Constants ¶
const ( // PauseAnnotationKey defines the annotation used to pause a chaos PauseAnnotationKey = "experiment.chaos-mesh.org/pause" LabelManagedBy = "managed-by" )
const ( // DefaultJitter defines default value for jitter DefaultJitter = "0ms" // DefaultCorrelation defines default value for correlation DefaultCorrelation = "0" )
const ( LabelControlledBy = "chaos-mesh.org/controlled-by" LabelWorkflow = "chaos-mesh.org/workflow" )
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
const DefaultJVMAgentPort int32 = 9277
const KindAWSChaos = "AWSChaos"
const KindBlockChaos = "BlockChaos"
const KindDNSChaos = "DNSChaos"
const KindGCPChaos = "GCPChaos"
const KindHTTPChaos = "HTTPChaos"
const KindIOChaos = "IOChaos"
const KindJVMChaos = "JVMChaos"
const KindKernelChaos = "KernelChaos"
const KindNetworkChaos = "NetworkChaos"
const KindPhysicalMachine = "PhysicalMachine"
const KindPhysicalMachineChaos = "PhysicalMachineChaos"
const KindPodChaos = "PodChaos"
const KindPodHttpChaos = "PodHttpChaos"
const KindPodIOChaos = "PodIOChaos"
const KindPodNetworkChaos = "PodNetworkChaos"
const KindSchedule = "Schedule"
const KindStressChaos = "StressChaos"
const KindTimeChaos = "TimeChaos"
const KindWorkflow = "Workflow"
const KindWorkflowNode = "WorkflowNode"
const (
// ValidateValueParseError defines the error message for value parse error
ValidateValueParseError = "parse value field error:%s"
)
Variables ¶
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 )
var AWSChaosWebhookLog = logf.Log.WithName("AWSChaos-resource")
var BlockChaosWebhookLog = logf.Log.WithName("BlockChaos-resource")
var DNSChaosWebhookLog = logf.Log.WithName("DNSChaos-resource")
var ErrCanNotUpdateChaos = errors.New("Cannot update chaos spec")
updating spec of a chaos will have no effect, we'd better reject it
var GCPChaosWebhookLog = logf.Log.WithName("GCPChaos-resource")
var HTTPChaosWebhookLog = logf.Log.WithName("HTTPChaos-resource")
var IOChaosWebhookLog = logf.Log.WithName("IOChaos-resource")
var JVMChaosWebhookLog = logf.Log.WithName("JVMChaos-resource")
var KernelChaosWebhookLog = logf.Log.WithName("KernelChaos-resource")
var NetworkChaosWebhookLog = logf.Log.WithName("NetworkChaos-resource")
var PhysicalMachineChaosWebhookLog = logf.Log.WithName("PhysicalMachineChaos-resource")
var PhysicalMachineWebhookLog = logf.Log.WithName("PhysicalMachine-resource")
var PodChaosWebhookLog = logf.Log.WithName("PodChaos-resource")
var PodHttpChaosWebhookLog = logf.Log.WithName("PodHttpChaos-resource")
var PodIOChaosWebhookLog = logf.Log.WithName("PodIOChaos-resource")
var PodNetworkChaosWebhookLog = logf.Log.WithName("PodNetworkChaos-resource")
var StandardCronParser = cron.NewParser( cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor, )
var StressChaosWebhookLog = logf.Log.WithName("StressChaos-resource")
var TimeChaosWebhookLog = logf.Log.WithName("TimeChaos-resource")
Functions ¶
func AllKinds ¶
AllKinds returns all chaos kinds, key is name of Kind, value is an accessor for spawning Object and List
func AllScheduleItemKinds ¶
AllKinds returns all chaos kinds.
func CheckPercent ¶
func ConvertUnitToBytes ¶
func FetchChaosByTemplateType ¶
func FetchChaosByTemplateType(templateType TemplateType) (runtime.Object, error)
func IsChaosTemplateType ¶
func IsChaosTemplateType(target TemplateType) bool
func ParseUnit ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSChaos.
func (*AWSChaos) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AWSChaos) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AWSChaos) DurationExceeded ¶
func (*AWSChaos) GetObjectMeta ¶
func (in *AWSChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (*AWSChaos) GetSelectorSpecs ¶
func (*AWSChaos) GetSpecAndMetaString ¶
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) ValidateCreate ¶
func (*AWSChaos) ValidateDelete ¶
ValidateDelete 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" )
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
type AWSSelector ¶
type AWSSelector struct {
// Endpoint indicates the endpoint of the aws server. Just used it in test now.
// +ui:form:ignore
// +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.
// +ui:form:when=action=='detach-volume'
// +optional
EbsVolume *string `json:"volumeID,omitempty" webhook:"EbsVolume,nilable"`
// DeviceName indicates the name of the device.
// Needed in detach-volume.
// +ui:form:when=action=='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 BlockChaos ¶
type BlockChaos struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec BlockChaosSpec `json:"spec"`
Status BlockChaosStatus `json:"status,omitempty"`
}
BlockChaos is the Schema for the blockchaos API
func (*BlockChaos) DeepCopy ¶
func (in *BlockChaos) DeepCopy() *BlockChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockChaos.
func (*BlockChaos) DeepCopyInto ¶
func (in *BlockChaos) DeepCopyInto(out *BlockChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BlockChaos) DeepCopyObject ¶
func (in *BlockChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*BlockChaos) Default ¶
func (in *BlockChaos) Default()
func (*BlockChaos) DurationExceeded ¶
func (*BlockChaos) GetCustomStatus ¶
func (obj *BlockChaos) GetCustomStatus() interface{}
func (*BlockChaos) GetObjectMeta ¶
func (in *BlockChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (*BlockChaos) GetSelectorSpecs ¶
func (obj *BlockChaos) GetSelectorSpecs() map[string]interface{}
func (*BlockChaos) GetSpecAndMetaString ¶
func (in *BlockChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (*BlockChaos) GetStatus ¶
func (in *BlockChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (*BlockChaos) IsDeleted ¶
func (in *BlockChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (*BlockChaos) IsOneShot ¶
func (in *BlockChaos) IsOneShot() bool
func (*BlockChaos) IsPaused ¶
func (in *BlockChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (*BlockChaos) Validate ¶
func (in *BlockChaos) Validate() error
func (*BlockChaos) ValidateCreate ¶
func (in *BlockChaos) ValidateCreate() error
func (*BlockChaos) ValidateDelete ¶
func (in *BlockChaos) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*BlockChaos) ValidateUpdate ¶
func (in *BlockChaos) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type BlockChaosAction ¶
type BlockChaosAction string
const ( BlockLimit BlockChaosAction = "limit" BlockDelay BlockChaosAction = "delay" )
type BlockChaosList ¶
type BlockChaosList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BlockChaos `json:"items"`
}
BlockChaosList contains a list of BlockChaos
func (*BlockChaosList) DeepCopy ¶
func (in *BlockChaosList) DeepCopy() *BlockChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockChaosList.
func (*BlockChaosList) DeepCopyInto ¶
func (in *BlockChaosList) DeepCopyInto(out *BlockChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BlockChaosList) DeepCopyList ¶
func (in *BlockChaosList) DeepCopyList() GenericChaosList
func (*BlockChaosList) DeepCopyObject ¶
func (in *BlockChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*BlockChaosList) GetItems ¶
func (in *BlockChaosList) GetItems() []GenericChaos
func (*BlockChaosList) ListChaos ¶
func (in *BlockChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
type BlockChaosSpec ¶
type BlockChaosSpec struct {
// Action defines the specific block chaos action.
// Supported action: limit / delay
// +kubebuilder:validation:Enum=limit;delay
Action BlockChaosAction `json:"action"`
// IOPS defines the limit of IO frequency.
// +optional
IOPS int `json:"iops,omitempty"`
// Delay defines the delay distribution.
// +optional
Delay *BlockDelaySpec `json:"delay,omitempty"`
ContainerNodeVolumePathSelector `json:",inline"`
// Duration represents the duration of the chaos action.
// +optional
Duration *string `json:"duration,omitempty" webhook:"Duration"`
}
BlockChaosSpec is the content of the specification for a BlockChaos
func (*BlockChaosSpec) DeepCopy ¶
func (in *BlockChaosSpec) DeepCopy() *BlockChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockChaosSpec.
func (*BlockChaosSpec) DeepCopyInto ¶
func (in *BlockChaosSpec) DeepCopyInto(out *BlockChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BlockChaosSpec) GetDuration ¶
func (in *BlockChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
type BlockChaosStatus ¶
type BlockChaosStatus struct {
ChaosStatus `json:",inline"`
// InjectionIds always specifies the number of injected chaos action
// +optional
InjectionIds map[string]int `json:"ids,omitempty"`
}
BlockChaosStatus represents the status of a BlockChaos
func (*BlockChaosStatus) DeepCopy ¶
func (in *BlockChaosStatus) DeepCopy() *BlockChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockChaosStatus.
func (*BlockChaosStatus) DeepCopyInto ¶
func (in *BlockChaosStatus) DeepCopyInto(out *BlockChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BlockDelaySpec ¶
type BlockDelaySpec struct {
// Latency defines the latency of every io request.
Latency string `json:"latency,omitempty" webhook:"Duration"`
// +optional
Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"`
// +optional
Jitter string `json:"jitter,omitempty" default:"0ms" webhook:"Duration"`
}
BlockDelaySpec describes the block delay specification
func (*BlockDelaySpec) DeepCopy ¶
func (in *BlockDelaySpec) DeepCopy() *BlockDelaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDelaySpec.
func (*BlockDelaySpec) DeepCopyInto ¶
func (in *BlockDelaySpec) DeepCopyInto(out *BlockDelaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
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 ¶
func (in *ChaosOnlyScheduleSpec) DeepCopy() *ChaosOnlyScheduleSpec
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClockIds.
func (ClockIds) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClockSpec.
func (*ClockSpec) DeepCopyInto ¶
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) Default ¶
func (in *ConcurrencyPolicy) Default()
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 ¶
func (in *ConditionalBranchStatus) DeepCopy() *ConditionalBranchStatus
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 ¶
func (in *ConditionalBranchesStatus) DeepCopy() *ConditionalBranchesStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalBranchesStatus.
func (*ConditionalBranchesStatus) DeepCopyInto ¶
func (in *ConditionalBranchesStatus) DeepCopyInto(out *ConditionalBranchesStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContainerNodeVolumePathSelector ¶
type ContainerNodeVolumePathSelector struct {
ContainerSelector `json:",inline"`
VolumeName string `json:"volumeName"`
}
ContainerNodeVolumePathSelector is the selector to select a node and a PV on it
func (*ContainerNodeVolumePathSelector) DeepCopy ¶
func (in *ContainerNodeVolumePathSelector) DeepCopy() *ContainerNodeVolumePathSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerNodeVolumePathSelector.
func (*ContainerNodeVolumePathSelector) DeepCopyInto ¶
func (in *ContainerNodeVolumePathSelector) DeepCopyInto(out *ContainerNodeVolumePathSelector)
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, the first container 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 ¶
+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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaos.
func (*DNSChaos) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DNSChaos) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DNSChaos) DurationExceeded ¶
func (*DNSChaos) GetObjectMeta ¶
func (in *DNSChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (*DNSChaos) GetSelectorSpecs ¶
func (*DNSChaos) GetSpecAndMetaString ¶
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) ValidateCreate ¶
func (*DNSChaos) ValidateDelete ¶
ValidateDelete 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DelaySpec.
func (*DelaySpec) DeepCopyInto ¶
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.
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)
type EmbedChaos ¶
type EmbedChaos struct {
// +optional
AWSChaos *AWSChaosSpec `json:"awsChaos,omitempty"`
// +optional
BlockChaos *BlockChaosSpec `json:"blockChaos,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)
type ExpInfo ¶
type ExpInfo struct {
// the experiment ID
// +optional
UID string `json:"uid,omitempty" swaggerignore:"true"`
// the subAction, generate automatically
// +optional
Action string `json:"action,omitempty" swaggerignore:"true"`
// +ui:form:when=action=='stress-cpu'
// +optional
StressCPU *StressCPUSpec `json:"stress-cpu,omitempty"`
// +ui:form:when=action=='stress-mem'
// +optional
StressMemory *StressMemorySpec `json:"stress-mem,omitempty"`
// +ui:form:when=action=='disk-read-payload'
// +optional
DiskReadPayload *DiskPayloadSpec `json:"disk-read-payload,omitempty"`
// +ui:form:when=action=='disk-write-payload'
// +optional
DiskWritePayload *DiskPayloadSpec `json:"disk-write-payload,omitempty"`
// +ui:form:when=action=='disk-fill'
// +optional
DiskFill *DiskFillSpec `json:"disk-fill,omitempty"`
// +ui:form:when=action=='network-corrupt'
// +optional
NetworkCorrupt *NetworkCorruptSpec `json:"network-corrupt,omitempty"`
// +ui:form:when=action=='network-duplicate'
// +optional
NetworkDuplicate *NetworkDuplicateSpec `json:"network-duplicate,omitempty"`
// +ui:form:when=action=='network-loss'
// +optional
NetworkLoss *NetworkLossSpec `json:"network-loss,omitempty"`
// +ui:form:when=action=='network-delay'
// +optional
NetworkDelay *NetworkDelaySpec `json:"network-delay,omitempty"`
// +ui:form:when=action=='network-partition'
// +optional
NetworkPartition *NetworkPartitionSpec `json:"network-partition,omitempty"`
// +ui:form:when=action=='network-dns'
// +optional
NetworkDNS *NetworkDNSSpec `json:"network-dns,omitempty"`
// +ui:form:when=action=='network-bandwidth'
// +optional
NetworkBandwidth *NetworkBandwidthSpec `json:"network-bandwidth,omitempty"`
// +ui:form:when=action=='process'
// +optional
Process *ProcessSpec `json:"process,omitempty"`
// +ui:form:when=action=='jvm-exception'
// +optional
JVMException *JVMExceptionSpec `json:"jvm-exception,omitempty"`
// +ui:form:when=action=='jvm-gc'
// +optional
JVMGC *JVMGCSpec `json:"jvm-gc,omitempty"`
// +ui:form:when=action=='jvm-latency'
// +optional
JVMLatency *JVMLatencySpec `json:"jvm-latency,omitempty"`
// +ui:form:when=action=='jvm-return'
// +optional
JVMReturn *JVMReturnSpec `json:"jvm-return,omitempty"`
// +ui:form:when=action=='jvm-stress'
// +optional
JVMStress *JVMStressSpec `json:"jvm-stress,omitempty"`
// +ui:form:when=action=='jvm-rule-data'
// +optional
JVMRuleData *JVMRuleDataSpec `json:"jvm-rule-data,omitempty"`
// +ui:form:when=action=='clock'
// +optional
Clock *ClockSpec `json:"clock,omitempty"`
}
func (*ExpInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExpInfo.
func (*ExpInfo) DeepCopyInto ¶
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://github.com/chaos-mesh/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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.
func (*Filter) DeepCopyInto ¶
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)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Frame.
func (*Frame) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPChaos.
func (*GCPChaos) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GCPChaos) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GCPChaos) DurationExceeded ¶
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 (*GCPChaos) GetSpecAndMetaString ¶
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) ValidateCreate ¶
func (*GCPChaos) ValidateDelete ¶
ValidateDelete 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" )
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.
type GCPSelector ¶
type GCPSelector struct {
// Project defines the ID 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.
// +ui:form:when=action=='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 ¶
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" swaggerignore:"true"`
// 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaos.
func (*HTTPChaos) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HTTPChaos) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*HTTPChaos) DurationExceeded ¶
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 (*HTTPChaos) GetSpecAndMetaString ¶
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) ValidateCreate ¶
func (*HTTPChaos) ValidateDelete ¶
ValidateDelete 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"`
// Target is the object to be selected and injected.
// +kubebuilder:validation:Enum=Request;Response
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
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaos.
func (*IOChaos) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IOChaos) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*IOChaos) DurationExceeded ¶
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 (*IOChaos) GetSpecAndMetaString ¶
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) ValidateCreate ¶
func (*IOChaos) ValidateDelete ¶
ValidateDelete 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".
// +ui:form:when=action=='latency'
// +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
// +ui:form:when=action=='fault'
// +optional
Errno uint32 `json:"errno,omitempty" webhook:"IOErrno"`
// Attr defines the overrided attribution
// +ui:form:when=action=='attrOverride'
// +optional
Attr *AttrOverrideSpec `json:"attr,omitempty"`
// Mistake defines what types of incorrectness are injected to IO operations
// +ui:form:when=action=='mistake'
// +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 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 ¶
IoFault represents the fault to inject and their weight
func (*IoFault) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IoFault.
func (*IoFault) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaos.
func (*JVMChaos) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*JVMChaos) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*JVMChaos) DurationExceeded ¶
func (*JVMChaos) GetObjectMeta ¶
func (in *JVMChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (*JVMChaos) GetSelectorSpecs ¶
func (*JVMChaos) GetSpecAndMetaString ¶
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) ValidateCreate ¶
func (*JVMChaos) ValidateDelete ¶
ValidateDelete 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
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMGCSpec.
func (*JVMGCSpec) DeepCopyInto ¶
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 (*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 ¶
func (in LabelSelectorRequirements) DeepCopy() LabelSelectorRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirements.
func (LabelSelectorRequirements) DeepCopyInto ¶
func (in LabelSelectorRequirements) DeepCopyInto(out *LabelSelectorRequirements)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LossSpec.
func (*LossSpec) DeepCopyInto ¶
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 ¶
func (in *NetworkBandwidthSpec) DeepCopy() *NetworkBandwidthSpec
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.
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 (*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
// +kubebuilder:default=to
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
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 ¶
func (in *NetworkDuplicateSpec) DeepCopy() *NetworkDuplicateSpec
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 ¶
func (in *NetworkPartitionSpec) DeepCopy() *NetworkPartitionSpec
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 PhysicalMachine ¶
type PhysicalMachine struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec defines the behavior of a physical machine
Spec PhysicalMachineSpec `json:"spec"`
}
PhysicalMachine is the Schema for the physical machine API
func (*PhysicalMachine) DeepCopy ¶
func (in *PhysicalMachine) DeepCopy() *PhysicalMachine
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachine.
func (*PhysicalMachine) DeepCopyInto ¶
func (in *PhysicalMachine) DeepCopyInto(out *PhysicalMachine)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PhysicalMachine) DeepCopyObject ¶
func (in *PhysicalMachine) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PhysicalMachine) Default ¶
func (in *PhysicalMachine) Default()
func (*PhysicalMachine) Validate ¶
func (in *PhysicalMachine) Validate() error
func (*PhysicalMachine) ValidateCreate ¶
func (in *PhysicalMachine) ValidateCreate() error
func (*PhysicalMachine) ValidateDelete ¶
func (in *PhysicalMachine) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*PhysicalMachine) ValidateUpdate ¶
func (in *PhysicalMachine) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
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 ¶
func (in *PhysicalMachineChaos) DeepCopy() *PhysicalMachineChaos
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 (*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" PMNetworkBandwidthAction PhysicalMachineChaosAction = "network-bandwidth" 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 ¶
func (in *PhysicalMachineChaosList) DeepCopy() *PhysicalMachineChaosList
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 ¶
func (in *PhysicalMachineChaosSpec) DeepCopy() *PhysicalMachineChaosSpec
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
type PhysicalMachineChaosStatus ¶
type PhysicalMachineChaosStatus struct {
ChaosStatus `json:",inline"`
}
PhysicalMachineChaosStatus defines the observed state of PhysicalMachineChaos
func (*PhysicalMachineChaosStatus) DeepCopy ¶
func (in *PhysicalMachineChaosStatus) DeepCopy() *PhysicalMachineChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineChaosStatus.
func (*PhysicalMachineChaosStatus) DeepCopyInto ¶
func (in *PhysicalMachineChaosStatus) DeepCopyInto(out *PhysicalMachineChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PhysicalMachineList ¶
type PhysicalMachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []PhysicalMachine `json:"items"`
}
PhysicalMachineList contains a list of PhysicalMachine
func (*PhysicalMachineList) DeepCopy ¶
func (in *PhysicalMachineList) DeepCopy() *PhysicalMachineList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineList.
func (*PhysicalMachineList) DeepCopyInto ¶
func (in *PhysicalMachineList) DeepCopyInto(out *PhysicalMachineList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PhysicalMachineList) DeepCopyObject ¶
func (in *PhysicalMachineList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PhysicalMachineSelector ¶
type PhysicalMachineSelector struct {
// DEPRECATED: Use Selector instead.
// Only one of Address and Selector could be specified.
// +optional
Address []string `json:"address,omitempty"`
// Selector is used to select physical machines that are used to inject chaos action.
// +optional
Selector PhysicalMachineSelectorSpec `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 physical machines to do chaos action.
// If `FixedPercentMode`, provide a number from 0-100 to specify the percent of physical machines 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 (*PhysicalMachineSelector) DeepCopy ¶
func (in *PhysicalMachineSelector) DeepCopy() *PhysicalMachineSelector
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 PhysicalMachineSelectorSpec ¶
type PhysicalMachineSelectorSpec struct {
GenericSelectorSpec `json:",inline"`
// PhysicalMachines is a map of string keys and a set values that used to select physical machines.
// The key defines the namespace which physical machine belong,
// and each value is a set of physical machine names.
// +optional
PhysicalMachines map[string][]string `json:"physicalMachines,omitempty"`
}
PhysicalMachineSelectorSpec defines some selectors to select objects. If the all selectors are empty, all objects will be used in chaos experiment.
func (*PhysicalMachineSelectorSpec) DeepCopy ¶
func (in *PhysicalMachineSelectorSpec) DeepCopy() *PhysicalMachineSelectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineSelectorSpec.
func (*PhysicalMachineSelectorSpec) DeepCopyInto ¶
func (in *PhysicalMachineSelectorSpec) DeepCopyInto(out *PhysicalMachineSelectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PhysicalMachineSelectorSpec) Empty ¶
func (spec *PhysicalMachineSelectorSpec) Empty() bool
type PhysicalMachineSpec ¶
type PhysicalMachineSpec struct {
// Address represents the address of the physical machine
Address string `json:"address"`
}
PhysicalMachineSpec defines the desired state of PhysicalMachine
func (*PhysicalMachineSpec) DeepCopy ¶
func (in *PhysicalMachineSpec) DeepCopy() *PhysicalMachineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineSpec.
func (*PhysicalMachineSpec) DeepCopyInto ¶
func (in *PhysicalMachineSpec) DeepCopyInto(out *PhysicalMachineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PhysicalMachineSpec) Default ¶
func (in *PhysicalMachineSpec) Default(root interface{}, field *reflect.StructField)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodChaos.
func (*PodChaos) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodChaos) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PodChaos) DurationExceeded ¶
func (*PodChaos) GetObjectMeta ¶
func (in *PodChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (*PodChaos) GetSelectorSpecs ¶
func (*PodChaos) GetSpecAndMetaString ¶
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) ValidateCreate ¶
func (*PodChaos) ValidateDelete ¶
ValidateDelete 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
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"`
}
PodHttpChaosActions 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 ¶
func (in *PodHttpChaosBaseRule) DeepCopy() *PodHttpChaosBaseRule
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 ¶
func (in *PodHttpChaosPatchActions) DeepCopy() *PodHttpChaosPatchActions
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 ¶
func (in *PodHttpChaosPatchBodyAction) DeepCopy() *PodHttpChaosPatchBodyAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosPatchBodyAction.
func (*PodHttpChaosPatchBodyAction) DeepCopyInto ¶
func (in *PodHttpChaosPatchBodyAction) DeepCopyInto(out *PodHttpChaosPatchBodyAction)
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 ¶
func (in *PodHttpChaosReplaceActions) DeepCopy() *PodHttpChaosReplaceActions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosReplaceActions.
func (*PodHttpChaosReplaceActions) DeepCopyInto ¶
func (in *PodHttpChaosReplaceActions) DeepCopyInto(out *PodHttpChaosReplaceActions)
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 ¶
func (in *PodHttpChaosSelector) DeepCopy() *PodHttpChaosSelector
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" )
type PodHttpChaosWebhookRunner ¶
type PodHttpChaosWebhookRunner struct {
// contains filtered or unexported fields
}
PodHttpChaosWebhookRunner runs webhook for podhttpchaos
func (*PodHttpChaosWebhookRunner) Handle ¶
func (r *PodHttpChaosWebhookRunner) Handle(ctx context.Context, req admission.Request) admission.Response
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 ¶
func (in *PodNetworkChaosStatus) DeepCopy() *PodNetworkChaosStatus
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)
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 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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawIPSet.
func (*RawIPSet) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Record.
func (*Record) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Schedule.
func (*Schedule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Schedule) DeepCopyObject ¶
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) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Schedule) ValidateDelete ¶
ValidateDelete 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:default=Forbid
// +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" ScheduleTypeBlockChaos ScheduleTemplateType = "BlockChaos" 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 (*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
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 stress-ng identifier
// +optional
UID string `json:"uid"`
// MemoryUID is the memStress identifier
// +optional
MemoryUID string `json:"memoryUid"`
// StartTime specifies when the stress-ng starts
// +optional
StartTime *metav1.Time `json:"startTime"`
// MemoryStartTime specifies when the memStress starts
// +optional
MemoryStartTime *metav1.Time `json:"memoryStartTime"`
}
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stressor.
func (*Stressor) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stressors.
func (*Stressors) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.
func (*Task) DeepCopyInto ¶
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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.
func (*Template) DeepCopyInto ¶
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" TypeBlockChaos TemplateType = "BlockChaos" 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeChaos.
func (*TimeChaos) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TimeChaos) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*TimeChaos) DurationExceeded ¶
func (*TimeChaos) GetObjectMeta ¶
func (in *TimeChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (*TimeChaos) GetSelectorSpecs ¶
func (*TimeChaos) GetSpecAndMetaString ¶
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) ValidateCreate ¶
func (*TimeChaos) ValidateDelete ¶
ValidateDelete 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
type Timespec ¶
Timespec represents a time
func (*Timespec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timespec.
func (*Timespec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebhookObject ¶
WebhookObject is basic Object which implement `webhook.Validator` and `webhook.Defaulter`
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.
func (*Workflow) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workflow) DeepCopyObject ¶
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 (*Workflow) ValidateDelete ¶
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 ¶
func (in *WorkflowNodeCondition) DeepCopy() *WorkflowNodeCondition
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 ¶
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.
Source Files
¶
- awschaos_types.go
- awschaos_webhook.go
- blockchaos_types.go
- blockchaos_webhook.go
- common_errors.go
- common_types.go
- common_webhook.go
- dnschaos_type.go
- gcpchaos_types.go
- gcpchaos_webhook.go
- groupversion_info.go
- httpchaos_types.go
- httpchaos_webhook.go
- iochaos_types.go
- iochaos_webhook.go
- jvmchaos_types.go
- jvmchaos_webhook.go
- kernelchaos_types.go
- kinds.go
- networkchaos_types.go
- networkchaos_webhook.go
- physical_machine_chaos_types.go
- physical_machine_chaos_webhook.go
- physical_machine_types.go
- physical_machine_webhook.go
- podchaos_types.go
- podchaos_webhook.go
- podhttpchaos_types.go
- podhttpchaos_webhook.go
- podiochaos_types.go
- podnetworkchaos_types.go
- schedule_item.go
- schedule_types.go
- schedule_webhook.go
- selector.go
- stresschaos_types.go
- stresschaos_webhook.go
- timechaos_types.go
- timechaos_webhook.go
- workflow_types.go
- workflow_webhook.go
- workflownode_types.go
- zz_generated.chaosmesh.go
- zz_generated.deepcopy.go
- zz_generated.schedule.chaosmesh.go
- zz_generated.workflow.chaosmesh.go