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 ParseCron(standardSpec string, cronField *field.Path) (cronv3.Schedule, field.ErrorList)
- func RegisterPodIoHandler(newHandler PodIoChaosHandler)
- func RegisterRawPodNetworkHandler(newHandler PodNetworkChaosHandler)
- func ValidatePodMode(value string, mode PodMode, valueField *field.Path) field.ErrorList
- func ValidateScheduler(schedulerObject InnerSchedulerObject, spec *field.Path) field.ErrorList
- type AttrOverrideSpec
- type BandwidthSpec
- type CPUStressor
- type ChainDirection
- type ChaosInstance
- type ChaosKind
- type ChaosList
- type ChaosPhase
- type ChaosStatus
- type ChaosValidator
- 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) GetChaos() *ChaosInstance
- func (in *DNSChaos) GetDuration() (*time.Duration, error)
- func (in *DNSChaos) GetNextRecover() time.Time
- func (in *DNSChaos) GetNextStart() time.Time
- func (in *DNSChaos) GetScheduler() *SchedulerSpec
- func (in *DNSChaos) GetSelectSpec() []SelectSpec
- func (in *DNSChaos) GetSpecAndMetaString() (string, error)
- func (in *DNSChaos) GetStatus() *ChaosStatus
- func (in *DNSChaos) IsDeleted() bool
- func (in *DNSChaos) IsPaused() bool
- func (in *DNSChaos) SetNextRecover(t time.Time)
- func (in *DNSChaos) SetNextStart(t time.Time)
- func (in *DNSChaos) Validate() error
- func (in *DNSChaos) ValidateCreate() error
- func (in *DNSChaos) ValidateDelete() error
- func (in *DNSChaos) ValidatePodMode(spec *field.Path) field.ErrorList
- func (in *DNSChaos) ValidateScheduler(spec *field.Path) field.ErrorList
- func (in *DNSChaos) ValidateUpdate(old runtime.Object) error
- type DNSChaosAction
- type DNSChaosList
- type DNSChaosScope
- type DNSChaosSpec
- type DNSChaosStatus
- type DelaySpec
- type Direction
- type DuplicateSpec
- type ExperimentPhase
- type ExperimentStatus
- type FailKernRequest
- type FileType
- type Filter
- type Frame
- 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) GetChaos() *ChaosInstance
- func (in *HTTPChaos) GetDuration() (*time.Duration, error)
- func (in *HTTPChaos) GetNextRecover() time.Time
- func (in *HTTPChaos) GetNextStart() time.Time
- func (in *HTTPChaos) GetScheduler() *SchedulerSpec
- func (in *HTTPChaos) GetSelectSpec() []SelectSpec
- func (in *HTTPChaos) GetSpecAndMetaString() (string, error)
- func (in *HTTPChaos) GetStatus() *ChaosStatus
- func (in *HTTPChaos) IsDeleted() bool
- func (in *HTTPChaos) IsPaused() bool
- func (in *HTTPChaos) SetNextRecover(t time.Time)
- func (in *HTTPChaos) SetNextStart(t time.Time)
- func (in *HTTPChaos) Validate() error
- func (in *HTTPChaos) ValidateCreate() error
- func (in *HTTPChaos) ValidateDelete() error
- func (in *HTTPChaos) ValidatePodMode(spec *field.Path) field.ErrorList
- func (in *HTTPChaos) ValidateScheduler(spec *field.Path) field.ErrorList
- func (in *HTTPChaos) ValidateUpdate(old runtime.Object) error
- type HTTPChaosAction
- type HTTPChaosList
- type HTTPChaosSpec
- type HTTPChaosStatus
- type InnerObject
- type InnerSchedulerObject
- 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) GetChaos() *ChaosInstance
- func (in *IoChaos) GetDuration() (*time.Duration, error)
- func (in *IoChaos) GetNextRecover() time.Time
- func (in *IoChaos) GetNextStart() time.Time
- func (in *IoChaos) GetScheduler() *SchedulerSpec
- func (in *IoChaos) GetSelectSpec() []SelectSpec
- func (in *IoChaos) GetSpecAndMetaString() (string, error)
- func (in *IoChaos) GetStatus() *ChaosStatus
- func (in *IoChaos) IsDeleted() bool
- func (in *IoChaos) IsPaused() bool
- func (in *IoChaos) SetNextRecover(t time.Time)
- func (in *IoChaos) SetNextStart(t time.Time)
- func (in *IoChaos) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (in *IoChaos) Validate() error
- func (in *IoChaos) ValidateCreate() error
- func (in *IoChaos) ValidateDelete() error
- func (in *IoChaos) ValidatePodMode(spec *field.Path) field.ErrorList
- func (in *IoChaos) ValidateScheduler(spec *field.Path) field.ErrorList
- func (in *IoChaos) ValidateUpdate(old runtime.Object) error
- type IoChaosAction
- type IoChaosList
- type IoChaosSpec
- type IoChaosStatus
- type IoChaosType
- 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) GetChaos() *ChaosInstance
- func (in *JVMChaos) GetDuration() (*time.Duration, error)
- func (in *JVMChaos) GetNextRecover() time.Time
- func (in *JVMChaos) GetNextStart() time.Time
- func (in *JVMChaos) GetScheduler() *SchedulerSpec
- func (in *JVMChaos) GetSelectSpec() []SelectSpec
- func (in *JVMChaos) GetSpecAndMetaString() (string, error)
- func (in *JVMChaos) GetStatus() *ChaosStatus
- func (in *JVMChaos) IsDeleted() bool
- func (in *JVMChaos) IsPaused() bool
- func (in *JVMChaos) SetNextRecover(t time.Time)
- func (in *JVMChaos) SetNextStart(t time.Time)
- func (in *JVMChaos) Validate() error
- func (in *JVMChaos) ValidateCreate() error
- func (in *JVMChaos) ValidateDelete() error
- func (in *JVMChaos) ValidatePodMode(spec *field.Path) field.ErrorList
- func (in *JVMChaos) ValidateScheduler(spec *field.Path) field.ErrorList
- func (in *JVMChaos) ValidateUpdate(old runtime.Object) error
- type JVMChaosAction
- type JVMChaosList
- type JVMChaosSpec
- type JVMChaosStatus
- type JVMCommonParameter
- type JVMCpufullloadSpec
- type JVMDelaySpec
- type JVMExceptionSpec
- type JVMOOMSpec
- type JVMParameter
- type JVMReturnSpec
- type JVMScriptSpec
- 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) GetChaos() *ChaosInstance
- func (in *KernelChaos) GetDuration() (*time.Duration, error)
- func (in *KernelChaos) GetNextRecover() time.Time
- func (in *KernelChaos) GetNextStart() time.Time
- func (in *KernelChaos) GetScheduler() *SchedulerSpec
- func (in *KernelChaos) GetSelectSpec() []SelectSpec
- func (in *KernelChaos) GetSpecAndMetaString() (string, error)
- func (in *KernelChaos) GetStatus() *ChaosStatus
- func (in *KernelChaos) IsDeleted() bool
- func (in *KernelChaos) IsPaused() bool
- func (in *KernelChaos) SetNextRecover(t time.Time)
- func (in *KernelChaos) SetNextStart(t time.Time)
- func (in *KernelChaos) Validate() error
- func (in *KernelChaos) ValidateCreate() error
- func (in *KernelChaos) ValidateDelete() error
- func (in *KernelChaos) ValidatePodMode(spec *field.Path) field.ErrorList
- func (in *KernelChaos) ValidateScheduler(spec *field.Path) field.ErrorList
- func (in *KernelChaos) ValidateUpdate(old runtime.Object) error
- type KernelChaosList
- type KernelChaosSpec
- type KernelChaosStatus
- type LabelSelectorRequirements
- type LossSpec
- type Matcher
- type MemoryStressor
- 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) GetChaos() *ChaosInstance
- func (in *NetworkChaos) GetDuration() (*time.Duration, error)
- func (in *NetworkChaos) GetNextRecover() time.Time
- func (in *NetworkChaos) GetNextStart() time.Time
- func (in *NetworkChaos) GetScheduler() *SchedulerSpec
- func (in *NetworkChaos) GetSelectSpec() []SelectSpec
- func (in *NetworkChaos) GetSpecAndMetaString() (string, error)
- func (in *NetworkChaos) GetStatus() *ChaosStatus
- func (in *NetworkChaos) IsDeleted() bool
- func (in *NetworkChaos) IsPaused() bool
- func (in *NetworkChaos) SetNextRecover(t time.Time)
- func (in *NetworkChaos) SetNextStart(t time.Time)
- func (in *NetworkChaos) Validate() error
- func (in *NetworkChaos) ValidateCreate() error
- func (in *NetworkChaos) ValidateDelete() error
- func (in *NetworkChaos) ValidatePodMode(spec *field.Path) field.ErrorList
- func (in *NetworkChaos) ValidateScheduler(spec *field.Path) field.ErrorList
- func (in *NetworkChaos) ValidateTargets(target *field.Path) field.ErrorList
- func (in *NetworkChaos) ValidateUpdate(old runtime.Object) error
- type NetworkChaosAction
- type NetworkChaosList
- type NetworkChaosSpec
- func (in *NetworkChaosSpec) DeepCopy() *NetworkChaosSpec
- func (in *NetworkChaosSpec) DeepCopyInto(out *NetworkChaosSpec)
- func (in *NetworkChaosSpec) DefaultDelay()
- func (in *NetworkChaosSpec) GetMode() PodMode
- func (in *NetworkChaosSpec) GetSelector() SelectorSpec
- func (in *NetworkChaosSpec) GetValue() string
- type NetworkChaosStatus
- 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) GetChaos() *ChaosInstance
- func (in *PodChaos) GetDuration() (*time.Duration, error)
- func (in *PodChaos) GetNextRecover() time.Time
- func (in *PodChaos) GetNextStart() time.Time
- func (in *PodChaos) GetScheduler() *SchedulerSpec
- func (in *PodChaos) GetSelectSpec() []SelectSpec
- func (in *PodChaos) GetSpecAndMetaString() (string, error)
- func (in *PodChaos) GetStatus() *ChaosStatus
- func (in *PodChaos) IsDeleted() bool
- func (in *PodChaos) IsPaused() bool
- func (in *PodChaos) SetNextRecover(t time.Time)
- func (in *PodChaos) SetNextStart(t time.Time)
- func (in *PodChaos) Validate() error
- func (in *PodChaos) ValidateCreate() error
- func (in *PodChaos) ValidateDelete() error
- func (in *PodChaos) ValidatePodMode(spec *field.Path) field.ErrorList
- func (in *PodChaos) ValidateScheduler(spec *field.Path) field.ErrorList
- func (in *PodChaos) ValidateUpdate(old runtime.Object) error
- type PodChaosAction
- type PodChaosList
- type PodChaosSpec
- type PodChaosStatus
- type PodIoChaos
- type PodIoChaosHandler
- type PodIoChaosList
- type PodIoChaosSpec
- type PodIoChaosWebhookRunner
- type PodMode
- 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) GetChaos() *ChaosInstance
- func (in *PodNetworkChaos) GetSelectSpec() []SelectSpec
- func (in *PodNetworkChaos) GetStatus() *ChaosStatus
- func (in *PodNetworkChaos) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (in *PodNetworkChaos) ValidateCreate() error
- func (in *PodNetworkChaos) ValidateDelete() error
- func (in *PodNetworkChaos) ValidateUpdate(old runtime.Object) error
- type PodNetworkChaosHandler
- type PodNetworkChaosList
- type PodNetworkChaosSpec
- type PodNetworkChaosStatus
- type PodStatus
- type RawIPSet
- type RawIptables
- type RawRuleSource
- type RawTrafficControl
- type ReorderSpec
- type ScheduleStatus
- type SchedulerSpec
- type SelectSpec
- type SelectorSpec
- type ServletCommonParameter
- type ServletDelaySpec
- type ServletExceptionSpec
- type StatefulObject
- 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) GetChaos() *ChaosInstance
- func (in *StressChaos) GetDuration() (*time.Duration, error)
- func (in *StressChaos) GetNextRecover() time.Time
- func (in *StressChaos) GetNextStart() time.Time
- func (in *StressChaos) GetScheduler() *SchedulerSpec
- func (in *StressChaos) GetSelectSpec() []SelectSpec
- func (in *StressChaos) GetSpecAndMetaString() (string, error)
- func (in *StressChaos) GetStatus() *ChaosStatus
- func (in *StressChaos) IsDeleted() bool
- func (in *StressChaos) IsPaused() bool
- func (in *StressChaos) SetNextRecover(t time.Time)
- func (in *StressChaos) SetNextStart(t time.Time)
- func (in *StressChaos) Validate() error
- func (in *StressChaos) ValidateCreate() error
- func (in *StressChaos) ValidateDelete() error
- func (in *StressChaos) ValidatePodMode(spec *field.Path) field.ErrorList
- func (in *StressChaos) ValidateScheduler(spec *field.Path) field.ErrorList
- func (in *StressChaos) ValidateUpdate(old runtime.Object) error
- type StressChaosList
- type StressChaosSpec
- func (in *StressChaosSpec) DeepCopy() *StressChaosSpec
- func (in *StressChaosSpec) DeepCopyInto(out *StressChaosSpec)
- func (in *StressChaosSpec) GetMode() PodMode
- func (in *StressChaosSpec) GetSelector() SelectorSpec
- func (in *StressChaosSpec) GetValue() string
- func (in *StressChaosSpec) Validate(parent *field.Path) field.ErrorList
- type StressChaosStatus
- type StressInstance
- type Stressor
- type Stressors
- type Target
- type TcParameter
- type TcType
- 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) GetChaos() *ChaosInstance
- func (in *TimeChaos) GetDuration() (*time.Duration, error)
- func (in *TimeChaos) GetNextRecover() time.Time
- func (in *TimeChaos) GetNextStart() time.Time
- func (in *TimeChaos) GetScheduler() *SchedulerSpec
- func (in *TimeChaos) GetSelectSpec() []SelectSpec
- func (in *TimeChaos) GetSpecAndMetaString() (string, error)
- func (in *TimeChaos) GetStatus() *ChaosStatus
- func (in *TimeChaos) IsDeleted() bool
- func (in *TimeChaos) IsPaused() bool
- func (in *TimeChaos) SetDefaultValue()
- func (in *TimeChaos) SetNextRecover(t time.Time)
- func (in *TimeChaos) SetNextStart(t time.Time)
- func (in *TimeChaos) Validate() error
- func (in *TimeChaos) ValidateCreate() error
- func (in *TimeChaos) ValidateDelete() error
- func (in *TimeChaos) ValidatePodMode(spec *field.Path) field.ErrorList
- func (in *TimeChaos) ValidateScheduler(spec *field.Path) field.ErrorList
- func (in *TimeChaos) ValidateUpdate(old runtime.Object) error
- type TimeChaosList
- type TimeChaosSpec
- type TimeChaosStatus
- type Timespec
- type Validateable
Constants ¶
const ( // ValidateSchedulerError defines the error message for ValidateScheduler ValidateSchedulerError = "schedule and duration should be omitted or defined at the same time" // ValidatePodchaosSchedulerError defines the error message for ValidateScheduler of Podchaos ValidatePodchaosSchedulerError = "schedule should be omitted" // ValidateValueParseError defines the error message for value parse error ValidateValueParseError = "parse value field error:%s" )
const ( HTTPDelayAction HTTPChaosAction = "delay" HTTPAbortAction = "abort" HTTPMixedAction = "mixed" )
const ( // DefaultJitter defines default value for jitter DefaultJitter = "0ms" // DefaultCorrelation defines default value for correlation DefaultCorrelation = "0" )
const KindDNSChaos = "DNSChaos"
const KindHTTPChaos = "HTTPChaos"
const KindIoChaos = "IoChaos"
const KindJVMChaos = "JVMChaos"
const KindKernelChaos = "KernelChaos"
const KindNetworkChaos = "NetworkChaos"
const KindPodChaos = "PodChaos"
const KindPodIoChaos = "PodIoChaos"
KindPodIoChaos is the kind for pod io chaos
const KindPodNetworkChaos = "PodNetworkChaos"
KindPodNetworkChaos is the kind for network chaos
const KindStressChaos = "StressChaos"
const KindTimeChaos = "TimeChaos"
const (
// PauseAnnotationKey defines the annotation used to pause a chaos
PauseAnnotationKey = "experiment.chaos-mesh.org/pause"
)
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 )
Functions ¶
func ParseCron ¶
ParseCron returns a new crontab schedule representing the given standardSpec (https://en.wikipedia.org/wiki/Cron)
func RegisterPodIoHandler ¶ added in v1.0.0
func RegisterPodIoHandler(newHandler PodIoChaosHandler)
RegisterPodIoHandler registers handler into webhook
func RegisterRawPodNetworkHandler ¶
func RegisterRawPodNetworkHandler(newHandler PodNetworkChaosHandler)
RegisterRawPodNetworkHandler registers handler into webhook
func ValidatePodMode ¶
ValidatePodMode validates the value with podmode
func ValidateScheduler ¶
func ValidateScheduler(schedulerObject InnerSchedulerObject, spec *field.Path) field.ErrorList
ValidateScheduler validates the InnerSchedulerObject
Types ¶
type AttrOverrideSpec ¶ added in v1.0.0
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 ¶ added in v1.0.0
func (in *AttrOverrideSpec) DeepCopy() *AttrOverrideSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttrOverrideSpec.
func (*AttrOverrideSpec) DeepCopyInto ¶ added in v1.0.0
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"` // 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.
func (*BandwidthSpec) ToTbf ¶
func (in *BandwidthSpec) ToTbf() (*chaosdaemonpb.Tbf, error)
ToTbf converts BandwidthSpec to *chaosdaemonpb.Tbf Bandwidth action use TBF under the hood. TBF stands for Token Bucket Filter, is a classful queueing discipline available for traffic control with the tc command. http://man7.org/linux/man-pages/man8/tc-tbf.8.html
type CPUStressor ¶
type CPUStressor struct { Stressor `json:",inline" mapstructure:",squash"` // 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 ChaosInstance ¶
type ChaosInstance struct { Name string Namespace string Kind string StartTime time.Time EndTime time.Time Action string Duration string Status string UID string }
ChaosInstance defines some common attribute for a chaos
type ChaosList ¶
type ChaosList interface { runtime.Object ListChaos() []*ChaosInstance }
ChaosList defines a common interface for chaos lists
type ChaosPhase ¶
type ChaosPhase string
ChaosPhase is the current status of chaos task.
const ( ChaosPhaseNone ChaosPhase = "" ChaosPhaseNormal ChaosPhase = "Normal" ChaosPhaseAbnormal ChaosPhase = "Abnormal" )
type ChaosStatus ¶
type ChaosStatus struct { FailedMessage string `json:"failedMessage,omitempty"` Scheduler ScheduleStatus `json:"scheduler,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.
func (*ChaosStatus) GetNextRecover ¶ added in v1.1.0
func (in *ChaosStatus) GetNextRecover() time.Time
func (*ChaosStatus) GetNextStart ¶ added in v1.1.0
func (in *ChaosStatus) GetNextStart() time.Time
func (*ChaosStatus) SetNextRecover ¶ added in v1.1.0
func (in *ChaosStatus) SetNextRecover(t time.Time)
func (*ChaosStatus) SetNextStart ¶ added in v1.1.0
func (in *ChaosStatus) SetNextStart(t time.Time)
type ChaosValidator ¶
type ChaosValidator interface { webhook.Validator // Validate validates chaos object Validate() error // ValidateScheduler validates the scheduler and duration ValidateScheduler(spec *field.Path) field.ErrorList // ValidatePodMode validates the value with podmode ValidatePodMode(spec *field.Path) field.ErrorList // GetSelectSpec returns the selector config for authority validate // Note: network chaos also contains select spec in target, so return array GetSelectSpec() []SelectSpec }
ChaosValidator describes the interface should be implemented in chaos
func GetChaosValidator ¶ added in v1.1.2
func GetChaosValidator(chaosKind string) ChaosValidator
GetChaosValidator returns chaos object by kind
type CorruptSpec ¶
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.
func (*CorruptSpec) ToNetem ¶
func (in *CorruptSpec) ToNetem() (*chaosdaemonpb.Netem, error)
ToNetem implements Netem interface.
type DNSChaos ¶ added in v1.1.0
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 ¶ added in v1.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaos.
func (*DNSChaos) DeepCopyInto ¶ added in v1.1.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DNSChaos) DeepCopyObject ¶ added in v1.1.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DNSChaos) Default ¶ added in v1.1.0
func (in *DNSChaos) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*DNSChaos) GetChaos ¶ added in v1.1.0
func (in *DNSChaos) GetChaos() *ChaosInstance
GetChaos would return the a record for chaos
func (*DNSChaos) GetDuration ¶ added in v1.1.0
GetDuration would return the duration for chaos
func (*DNSChaos) GetNextRecover ¶ added in v1.1.0
func (*DNSChaos) GetNextStart ¶ added in v1.1.0
func (*DNSChaos) GetScheduler ¶ added in v1.1.0
func (in *DNSChaos) GetScheduler() *SchedulerSpec
GetScheduler would return the scheduler for chaos
func (*DNSChaos) GetSelectSpec ¶ added in v1.1.2
func (in *DNSChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*DNSChaos) GetSpecAndMetaString ¶ added in v1.1.2
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (*DNSChaos) GetStatus ¶ added in v1.1.0
func (in *DNSChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (*DNSChaos) IsDeleted ¶ added in v1.1.0
IsDeleted returns whether this resource has been deleted
func (*DNSChaos) SetNextRecover ¶ added in v1.1.0
func (*DNSChaos) SetNextStart ¶ added in v1.1.0
func (*DNSChaos) ValidateCreate ¶ added in v1.1.0
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*DNSChaos) ValidateDelete ¶ added in v1.1.0
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*DNSChaos) ValidatePodMode ¶ added in v1.1.0
ValidatePodMode validates the value with podmode
func (*DNSChaos) ValidateScheduler ¶ added in v1.1.0
ValidateScheduler validates the scheduler and duration
type DNSChaosAction ¶ added in v1.1.0
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 ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (in *DNSChaosList) DeepCopy() *DNSChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaosList.
func (*DNSChaosList) DeepCopyInto ¶ added in v1.1.0
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) DeepCopyObject ¶ added in v1.1.0
func (in *DNSChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*DNSChaosList) ListChaos ¶ added in v1.1.0
func (in *DNSChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of chaos
type DNSChaosScope ¶ added in v1.1.0
type DNSChaosScope string
DNSChaosScope is the scope which the DNS chaos works.
const ( // OuterScope represents DNS chaos only works on the inner host in Kubernetes cluster OuterScope DNSChaosScope = "outer" // InnerScope represents DNS chaos only works on the outer host of Kubernetes cluster InnerScope DNSChaosScope = "inner" // AllScope represents DNS chaos works on host AllScope DNSChaosScope = "all" )
type DNSChaosSpec ¶ added in v1.1.0
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"` // 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 PodMode `json:"mode"` // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. // If `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional Value string `json:"value"` // Selector is used to select pods that are used to inject chaos action. Selector SelectorSpec `json:"selector"` // Duration represents the duration of the chaos action Duration *string `json:"duration,omitempty"` // Scheduler defines some schedule rules to control the running time of the chaos experiment about network. Scheduler *SchedulerSpec `json:"scheduler,omitempty"` // Action defines the scope which the DNS chaos works. // Supported action: outer, inner, all // Default action: outer // +kubebuilder:validation:Enum=outer;inner;all Scope DNSChaosScope `json:"scope"` }
DNSChaosSpec defines the desired state of DNSChaos
func (*DNSChaosSpec) DeepCopy ¶ added in v1.1.0
func (in *DNSChaosSpec) DeepCopy() *DNSChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaosSpec.
func (*DNSChaosSpec) DeepCopyInto ¶ added in v1.1.0
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) GetMode ¶ added in v1.1.0
func (in *DNSChaosSpec) GetMode() PodMode
GetMode is a getter for Mode (for implementing SelectSpec)
func (*DNSChaosSpec) GetSelector ¶ added in v1.1.0
func (in *DNSChaosSpec) GetSelector() SelectorSpec
GetSelector is a getter for Selector (for implementing SelectSpec)
func (*DNSChaosSpec) GetValue ¶ added in v1.1.0
func (in *DNSChaosSpec) GetValue() string
GetValue is a getter for Value (for implementing SelectSpec)
type DNSChaosStatus ¶ added in v1.1.0
type DNSChaosStatus struct {
ChaosStatus `json:",inline"`
}
DNSChaosStatus defines the observed state of DNSChaos
func (*DNSChaosStatus) DeepCopy ¶ added in v1.1.0
func (in *DNSChaosStatus) DeepCopy() *DNSChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaosStatus.
func (*DNSChaosStatus) DeepCopyInto ¶ added in v1.1.0
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"` Correlation string `json:"correlation,omitempty"` Jitter string `json:"jitter,omitempty"` 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 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.
type DuplicateSpec ¶
type DuplicateSpec struct { Duplicate string `json:"duplicate"` Correlation string `json:"correlation"` }
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.
func (*DuplicateSpec) ToNetem ¶
func (in *DuplicateSpec) ToNetem() (*chaosdaemonpb.Netem, error)
ToNetem implements Netem interface.
type ExperimentPhase ¶
type ExperimentPhase string
ExperimentPhase is the current status of chaos experiment.
const ( ExperimentPhaseUninitialized ExperimentPhase = "" ExperimentPhaseRunning ExperimentPhase = "Running" ExperimentPhaseWaiting ExperimentPhase = "Waiting" ExperimentPhasePaused ExperimentPhase = "Paused" ExperimentPhaseFailed ExperimentPhase = "Failed" ExperimentPhaseFinished ExperimentPhase = "Finished" )
type ExperimentStatus ¶
type ExperimentStatus struct { // +optional Phase ExperimentPhase `json:"phase,omitempty"` // +optional Reason string `json:"reason,omitempty"` // +optional StartTime *metav1.Time `json:"startTime,omitempty"` // +optional EndTime *metav1.Time `json:"endTime,omitempty"` // +optional Duration string `json:"duration,omitempty"` // +optional PodRecords []PodStatus `json:"podRecords,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 Filter ¶ added in v1.0.0
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 ¶ added in v1.0.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.
func (*Filter) DeepCopyInto ¶ added in v1.0.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 HTTPChaos ¶ added in v1.1.0
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 ¶ added in v1.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaos.
func (*HTTPChaos) DeepCopyInto ¶ added in v1.1.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HTTPChaos) DeepCopyObject ¶ added in v1.1.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*HTTPChaos) Default ¶ added in v1.1.2
func (in *HTTPChaos) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*HTTPChaos) GetChaos ¶ added in v1.1.0
func (in *HTTPChaos) GetChaos() *ChaosInstance
GetChaos would return the a record for chaos
func (*HTTPChaos) GetDuration ¶ added in v1.1.0
GetDuration would return the duration for chaos
func (*HTTPChaos) GetNextRecover ¶ added in v1.1.0
func (*HTTPChaos) GetNextStart ¶ added in v1.1.0
func (*HTTPChaos) GetScheduler ¶ added in v1.1.0
func (in *HTTPChaos) GetScheduler() *SchedulerSpec
GetScheduler would return the scheduler for chaos
func (*HTTPChaos) GetSelectSpec ¶ added in v1.1.2
func (in *HTTPChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*HTTPChaos) GetSpecAndMetaString ¶ added in v1.1.2
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (*HTTPChaos) GetStatus ¶ added in v1.1.0
func (in *HTTPChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (*HTTPChaos) IsDeleted ¶ added in v1.1.0
IsDeleted returns whether this resource has been deleted
func (*HTTPChaos) SetNextRecover ¶ added in v1.1.0
func (*HTTPChaos) SetNextStart ¶ added in v1.1.0
func (*HTTPChaos) ValidateCreate ¶ added in v1.1.2
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*HTTPChaos) ValidateDelete ¶ added in v1.1.2
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*HTTPChaos) ValidatePodMode ¶ added in v1.1.2
ValidatePodMode validates the value with podmode
func (*HTTPChaos) ValidateScheduler ¶ added in v1.1.2
ValidateScheduler validates the scheduler and duration
type HTTPChaosAction ¶ added in v1.1.0
type HTTPChaosAction string
HTTPChaosAction represents the chaos action about HTTP.
type HTTPChaosList ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (in *HTTPChaosList) DeepCopy() *HTTPChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaosList.
func (*HTTPChaosList) DeepCopyInto ¶ added in v1.1.0
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) DeepCopyObject ¶ added in v1.1.0
func (in *HTTPChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*HTTPChaosList) ListChaos ¶ added in v1.1.0
func (in *HTTPChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of chaos
type HTTPChaosSpec ¶ added in v1.1.0
type HTTPChaosSpec struct { // Selector is used to select pods that are used to inject chaos action. Selector SelectorSpec `json:"selector"` // Scheduler defines some schedule rules to // control the running time of the chaos experiment about pods. Scheduler *SchedulerSpec `json:"scheduler,omitempty"` // Action defines the specific pod chaos action. // Supported action: delay | abort | mixed // Default action: delay // +kubebuilder:validation:Enum=delay;abort;mixed Action HTTPChaosAction `json:"action"` // 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 PodMode `json:"mode"` // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. // IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional Value string `json:"value"` // 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"` // Percent defines the percentage of injection errors and provides a number from 0-100. // default: 100. // +optional Percent string `json:"percent,omitempty"` // Specifies how the header match will be performed to route the request. Headers []Matcher `json:"headers,omitempty"` }
func (*HTTPChaosSpec) DeepCopy ¶ added in v1.1.0
func (in *HTTPChaosSpec) DeepCopy() *HTTPChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaosSpec.
func (*HTTPChaosSpec) DeepCopyInto ¶ added in v1.1.0
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) GetHeaders ¶ added in v1.1.0
func (in *HTTPChaosSpec) GetHeaders() []Matcher
func (*HTTPChaosSpec) GetMode ¶ added in v1.1.0
func (in *HTTPChaosSpec) GetMode() PodMode
func (*HTTPChaosSpec) GetSelector ¶ added in v1.1.0
func (in *HTTPChaosSpec) GetSelector() SelectorSpec
func (*HTTPChaosSpec) GetValue ¶ added in v1.1.0
func (in *HTTPChaosSpec) GetValue() string
type HTTPChaosStatus ¶ added in v1.1.0
type HTTPChaosStatus struct {
ChaosStatus `json:",inline"`
}
func (*HTTPChaosStatus) DeepCopy ¶ added in v1.1.0
func (in *HTTPChaosStatus) DeepCopy() *HTTPChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaosStatus.
func (*HTTPChaosStatus) DeepCopyInto ¶ added in v1.1.0
func (in *HTTPChaosStatus) DeepCopyInto(out *HTTPChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InnerObject ¶
type InnerObject interface { IsDeleted() bool IsPaused() bool GetChaos() *ChaosInstance GetSpecAndMetaString() (string, error) StatefulObject }
InnerObject is basic Object for the Reconciler
type InnerSchedulerObject ¶
type InnerSchedulerObject interface { InnerObject GetDuration() (*time.Duration, error) GetNextStart() time.Time SetNextStart(time.Time) GetNextRecover() time.Time SetNextRecover(time.Time) GetScheduler() *SchedulerSpec }
InnerSchedulerObject is the Object for the twophase reconcile
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) Default ¶
func (in *IoChaos) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*IoChaos) GetChaos ¶
func (in *IoChaos) GetChaos() *ChaosInstance
GetChaos would return the a record for chaos
func (*IoChaos) GetDuration ¶
GetDuration would return the duration for chaos
func (*IoChaos) GetNextRecover ¶
func (*IoChaos) GetNextStart ¶
func (*IoChaos) GetScheduler ¶
func (in *IoChaos) GetScheduler() *SchedulerSpec
GetScheduler would return the scheduler for chaos
func (*IoChaos) GetSelectSpec ¶ added in v1.1.2
func (in *IoChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*IoChaos) GetSpecAndMetaString ¶ added in v1.1.2
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) SetNextRecover ¶
func (*IoChaos) SetNextStart ¶
func (*IoChaos) SetupWebhookWithManager ¶
SetupWebhookWithManager setup IoChaos's webhook with manager
func (*IoChaos) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*IoChaos) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*IoChaos) ValidatePodMode ¶
ValidatePodMode validates the value with podmode
func (*IoChaos) ValidateScheduler ¶
ValidateScheduler validates the scheduler and duration
type IoChaosAction ¶ added in v1.0.0
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"` // Source represents the source of current rules Source string `json:"source,omitempty"` }
IoChaosAction defines an possible action of IoChaos
func (*IoChaosAction) DeepCopy ¶ added in v1.0.0
func (in *IoChaosAction) DeepCopy() *IoChaosAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IoChaosAction.
func (*IoChaosAction) DeepCopyInto ¶ added in v1.0.0
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) DeepCopyObject ¶
func (in *IoChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*IoChaosList) ListChaos ¶
func (in *IoChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of chaos
type IoChaosSpec ¶
type IoChaosSpec struct { // Selector is used to select pods that are used to inject chaos action. Selector SelectorSpec `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 PodMode `json:"mode"` // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. // IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional Value string `json:"value"` // Action defines the specific pod chaos action. // Supported action: latency / fault / attrOverride // +kubebuilder:validation:Enum=latency;fault;attrOverride Action IoChaosType `json:"action"` // Delay defines the value of I/O chaos action delay. // A delay string is a possibly signed sequence of // decimal numbers, each with optional fraction and a unit suffix, // such as "300ms". // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". // +optional Delay string `json:"delay,omitempty"` // Errno defines the error code that returned by I/O action. // refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html // +optional Errno uint32 `json:"errno,omitempty"` // Attr defines the overrided attribution // +optional Attr *AttrOverrideSpec `json:"attr,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"` // VolumePath represents the mount path of injected volume VolumePath string `json:"volumePath"` // ContainerName indicates the target container to inject iochaos in // +optional ContainerName *string `json:"containerName,omitempty"` // Scheduler defines some schedule rules to // control the running time of the chaos experiment about pods. Scheduler *SchedulerSpec `json:"scheduler,omitempty"` // 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"` }
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) GetMode ¶
func (in *IoChaosSpec) GetMode() PodMode
func (*IoChaosSpec) GetSelector ¶
func (in *IoChaosSpec) GetSelector() SelectorSpec
func (*IoChaosSpec) GetValue ¶
func (in *IoChaosSpec) GetValue() string
type IoChaosStatus ¶
type IoChaosStatus struct {
ChaosStatus `json:",inline"`
}
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 ¶ added in v1.0.0
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" )
type IoFault ¶ added in v1.0.0
IoFault represents the fault to inject and their weight
func (*IoFault) DeepCopy ¶ added in v1.0.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IoFault.
func (*IoFault) DeepCopyInto ¶ added in v1.0.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IoMethod ¶ added in v1.0.0
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 ¶ added in v1.1.0
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 ¶ added in v1.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaos.
func (*JVMChaos) DeepCopyInto ¶ added in v1.1.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*JVMChaos) DeepCopyObject ¶ added in v1.1.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*JVMChaos) Default ¶ added in v1.1.0
func (in *JVMChaos) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*JVMChaos) GetChaos ¶ added in v1.1.0
func (in *JVMChaos) GetChaos() *ChaosInstance
GetChaos would return the a record for chaos
func (*JVMChaos) GetDuration ¶ added in v1.1.0
GetDuration would return the duration for chaos
func (*JVMChaos) GetNextRecover ¶ added in v1.1.0
func (*JVMChaos) GetNextStart ¶ added in v1.1.0
func (*JVMChaos) GetScheduler ¶ added in v1.1.0
func (in *JVMChaos) GetScheduler() *SchedulerSpec
GetScheduler would return the scheduler for chaos
func (*JVMChaos) GetSelectSpec ¶ added in v1.1.2
func (in *JVMChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*JVMChaos) GetSpecAndMetaString ¶ added in v1.1.2
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (*JVMChaos) GetStatus ¶ added in v1.1.0
func (in *JVMChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (*JVMChaos) IsDeleted ¶ added in v1.1.0
IsDeleted returns whether this resource has been deleted
func (*JVMChaos) SetNextRecover ¶ added in v1.1.0
func (*JVMChaos) SetNextStart ¶ added in v1.1.0
func (*JVMChaos) ValidateCreate ¶ added in v1.1.0
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*JVMChaos) ValidateDelete ¶ added in v1.1.0
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*JVMChaos) ValidatePodMode ¶ added in v1.1.0
ValidatePodMode validates the value with podmode
func (*JVMChaos) ValidateScheduler ¶ added in v1.1.0
ValidateScheduler validates the scheduler and duration
type JVMChaosAction ¶ added in v1.1.0
type JVMChaosAction string
JVMChaosAction represents the chaos action about jvm
const ( // JVMDelayAction represents the JVM chaos action of invoke delay JVMDelayAction JVMChaosAction = "delay" // JVMReturnAction represents the JVM chaos action of return value JVMReturnAction JVMChaosAction = "return" // JVMReturnAction represents the JVM chaos action for complex failure scenarios. // Write Java or Groovy scripts, such as tampering with parameters, modifying return values, // throwing custom exceptions, and so on JVMScriptAction JVMChaosAction = "script" // JVMCpuFullloadAction represents the JVM chaos action of CPU is full JVMCpuFullloadAction JVMChaosAction = "cfl" // JVMOOMAction represents the JVM chaos action of OOM exception JVMOOMAction JVMChaosAction = "oom" // JVMCodeCacheFillingAction represents the JVM chaos action of code cache filling JVMCodeCacheFillingAction JVMChaosAction = "ccf" // JVMExceptionAction represents the JVM chaos action of throwing custom exceptions JVMExceptionAction JVMChaosAction = "tce" // ServletDelayAction represents the JVM chaos action of Servlet response delay ServletDelayAction JVMChaosAction = "delay4servlet" // ServletExceptionAction represents the JVM chaos action of Servlet throwing custom exceptions ServletExceptionAction JVMChaosAction = "tce4servlet" )
type JVMChaosList ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (in *JVMChaosList) DeepCopy() *JVMChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaosList.
func (*JVMChaosList) DeepCopyInto ¶ added in v1.1.0
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) DeepCopyObject ¶ added in v1.1.0
func (in *JVMChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*JVMChaosList) ListChaos ¶ added in v1.1.0
func (in *JVMChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of chaos
type JVMChaosSpec ¶ added in v1.1.0
type JVMChaosSpec struct { // Mode defines the mode to run chaos action. // Supported mode: one / all / fixed / fixed-percent / random-max-percent Mode PodMode `json:"mode"` // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the max % of pods the server can do chaos action. // If `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the % of pods to do chaos action // +optional Value string `json:"value"` // Selector is used to select pods that are used to inject chaos action. Selector SelectorSpec `json:"selector"` // Duration represents the duration of the chaos action // +optional Duration *string `json:"duration,omitempty"` // Scheduler defines some schedule rules to control the running time of the chaos experiment about time. // +optional Scheduler *SchedulerSpec `json:"scheduler,omitempty"` // Action defines the specific jvm chaos action. // Supported action: delay, return, script, cfl, oom, ccf, tce, delay4servlet, tce4servlet // +kubebuilder:validation:Enum=delay;return;script;cfl;oom;ccf;tce;delay4servlet;tce4servlet 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 ¶ added in v1.1.0
func (in *JVMChaosSpec) DeepCopy() *JVMChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaosSpec.
func (*JVMChaosSpec) DeepCopyInto ¶ added in v1.1.0
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) GetMode ¶ added in v1.1.2
func (in *JVMChaosSpec) GetMode() PodMode
GetMode is a getter for Mode (for implementing SelectSpec)
func (*JVMChaosSpec) GetSelector ¶ added in v1.1.2
func (in *JVMChaosSpec) GetSelector() SelectorSpec
GetSelector is a getter for Selector (for implementing SelectSpec)
func (*JVMChaosSpec) GetValue ¶ added in v1.1.2
func (in *JVMChaosSpec) GetValue() string
GetValue is a getter for Value (for implementing SelectSpec)
type JVMChaosStatus ¶ added in v1.1.0
type JVMChaosStatus struct {
ChaosStatus `json:",inline"`
}
JVMChaosStatus defines the observed state of JVMChaos
func (*JVMChaosStatus) DeepCopy ¶ added in v1.1.0
func (in *JVMChaosStatus) DeepCopy() *JVMChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaosStatus.
func (*JVMChaosStatus) DeepCopyInto ¶ added in v1.1.0
func (in *JVMChaosStatus) DeepCopyInto(out *JVMChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMCommonParameter ¶ added in v1.1.0
type JVMCommonParameter struct { // Classname represents specify the class name, which must be an implementation class with a full package name, such as com.xxx.xxx.XController. required Classname string `json:"classname"` // Methodname represents specify the method name. Note that methods with the same method name will be injected with the same fault. required Methodname string `json:"methodname"` // After represents method execution is completed before the injection failure is returned. // +optional After bool `json:"after"` }
JVMCommonParameter represents the common jvm chaos parameter
func (*JVMCommonParameter) DeepCopy ¶ added in v1.1.0
func (in *JVMCommonParameter) DeepCopy() *JVMCommonParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMCommonParameter.
func (*JVMCommonParameter) DeepCopyInto ¶ added in v1.1.0
func (in *JVMCommonParameter) DeepCopyInto(out *JVMCommonParameter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMCpufullloadSpec ¶ added in v1.1.0
type JVMCpufullloadSpec struct { // JVMCommonParameter represents the common jvm chaos parameter JVMCommonParameter `json:",inline"` // CpuCount represents the number of CPU cores to bind to, that is, specify how many cores are full CpuCount int `json:"cpucount"` }
JVMCpufullloadSpec represents the detail about JVM chaos action of CPU is full
func (*JVMCpufullloadSpec) DeepCopy ¶ added in v1.1.0
func (in *JVMCpufullloadSpec) DeepCopy() *JVMCpufullloadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMCpufullloadSpec.
func (*JVMCpufullloadSpec) DeepCopyInto ¶ added in v1.1.0
func (in *JVMCpufullloadSpec) DeepCopyInto(out *JVMCpufullloadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMDelaySpec ¶ added in v1.1.0
type JVMDelaySpec struct { // JVMCommonParameter represents the common jvm chaos parameter JVMCommonParameter `json:",inline"` // Time represents delay time, in milliseconds, required Time int `json:"time"` // Offset represents delay fluctuation time // +optional Offset int `json:"offset"` }
JVMDelaySpec represents the detail about JVM chaos action of invoke delay
func (*JVMDelaySpec) DeepCopy ¶ added in v1.1.0
func (in *JVMDelaySpec) DeepCopy() *JVMDelaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMDelaySpec.
func (*JVMDelaySpec) DeepCopyInto ¶ added in v1.1.0
func (in *JVMDelaySpec) DeepCopyInto(out *JVMDelaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMExceptionSpec ¶ added in v1.1.0
type JVMExceptionSpec struct { // JVMCommonParameter represents the common jvm chaos parameter JVMCommonParameter `json:",inline"` // Exception represents the Exception class, with the full package name, must inherit from java.lang.Exception or Java.lang.Exception itself Exception string `json:"exception"` // Message represents specifies the exception class information. // +optional Message string `json:"message"` }
JVMExceptionSpec represents the detail about JVM chaos action of throwing custom exceptions
func (*JVMExceptionSpec) DeepCopy ¶ added in v1.1.0
func (in *JVMExceptionSpec) DeepCopy() *JVMExceptionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMExceptionSpec.
func (*JVMExceptionSpec) DeepCopyInto ¶ added in v1.1.0
func (in *JVMExceptionSpec) DeepCopyInto(out *JVMExceptionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMOOMSpec ¶ added in v1.1.0
type JVMOOMSpec struct { // JVMCommonParameter represents the common jvm chaos parameter JVMCommonParameter `json:",inline"` // Area represents JVM memory area, currently supported [HEAP, NOHEAP, OFFHEAP], required. // Eden+Old is denoted by HEAP // Metaspace is denoted by NOHEAP // off-heap memory is denoted by OFFHEAP // +kubebuilder:validation:Enum=HEAP;NOHEAP;OFFHEAP Area string `json:"area"` // Block represents specifies the size of the object that supports only the HEAP and OFFHEAP areas in MB // +optional Block string `json:"block"` // Interval represents unit MS, default interval between 500 OOM exceptions, only in non-violent mode, can slow down the frequency of GC without worrying about the process being unresponsive // +optional Interval int `json:"interval"` // WildMode represents default false, whether to turn on wild mode or not. // If it is wild mode, the memory created before will not be released after OOM occurrence, which may cause the application process to be unresponsive // +optional WildMode bool `json:"wildmode"` }
JVMOOMSpec represents the detail about JVM chaos action of OOM exception
func (*JVMOOMSpec) DeepCopy ¶ added in v1.1.0
func (in *JVMOOMSpec) DeepCopy() *JVMOOMSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMOOMSpec.
func (*JVMOOMSpec) DeepCopyInto ¶ added in v1.1.0
func (in *JVMOOMSpec) DeepCopyInto(out *JVMOOMSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMParameter ¶ added in v1.1.0
type JVMParameter struct { // EffectCount represents the number of affect // +optional EffectCount int `json:"effectcount"` // EffectPercent represents the percent of affect // +optional EffectPercent int `json:"effectpercent"` // Delay represents the detail about JVM chaos action of invoke delay // +optional Delay *JVMDelaySpec `json:"delay,omitempty"` // Return represents the detail about JVM chaos action of return value // +optional Return *JVMReturnSpec `json:"return,omitempty"` // Script represents the detail about JVM chaos action of Java or Groovy scripts // +optional Script *JVMScriptSpec `json:"script,omitempty"` // CpuFullload represents the detail about JVM chaos action of CPU is full // +optional CpuFullload *JVMCpufullloadSpec `json:"cfl,omitempty"` // OOM represents the detail about JVM chaos action of OOM exception // +optional OOM *JVMOOMSpec `json:"oom,omitempty"` // Exception represents the detail about JVM chaos action of throwing custom exceptions // +optional Exception *JVMExceptionSpec `json:"tce,omitempty"` // Delay4Servlet represents the detail about JVM chaos action of Servlet response delay // +optional Delay4Servlet *ServletDelaySpec `json:"delay4servlet,omitempty"` // Exception4Servlet represents the detail about JVM chaos action of Servlet throwing custom exceptions // +optional Exception4Servlet *ServletExceptionSpec `json:"tce4servlet,omitempty"` }
JVMParameter represents the detail about jvm chaos action definition
func (*JVMParameter) DeepCopy ¶ added in v1.1.0
func (in *JVMParameter) DeepCopy() *JVMParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMParameter.
func (*JVMParameter) DeepCopyInto ¶ added in v1.1.0
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 ¶ added in v1.1.0
type JVMReturnSpec struct { // JVMCommonParameter represents the common jvm chaos parameter JVMCommonParameter `json:",inline"` // Value represents specifies the return value of a class method, supporting only primitive, null, and String return values. required Value string `json:"value"` }
JVMReturnSpec represents the detail about JVM chaos action of return value
func (*JVMReturnSpec) DeepCopy ¶ added in v1.1.0
func (in *JVMReturnSpec) DeepCopy() *JVMReturnSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMReturnSpec.
func (*JVMReturnSpec) DeepCopyInto ¶ added in v1.1.0
func (in *JVMReturnSpec) DeepCopyInto(out *JVMReturnSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMScriptSpec ¶ added in v1.1.0
type JVMScriptSpec struct { // JVMCommonParameter represents the common jvm chaos parameter JVMCommonParameter `json:",inline"` // Content represents the script content is Base64 encoded content. // Note that it cannot be used with file // +optional Content string `json:"content"` // File represents script file, absolute path to file // Note that it cannot be used with content // +optional File string `json:"file"` // Name represents script name, use for logging // +optional Name string `json:"name"` // Type represents script type, java or groovy, default to java // +kubebuilder:validation:Enum=java;groovy; // +optional Type string `json:"type"` }
JVMScriptSpec represents the detail about JVM chaos action of Java or Groovy scripts
func (*JVMScriptSpec) DeepCopy ¶ added in v1.1.0
func (in *JVMScriptSpec) DeepCopy() *JVMScriptSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMScriptSpec.
func (*JVMScriptSpec) DeepCopyInto ¶ added in v1.1.0
func (in *JVMScriptSpec) DeepCopyInto(out *JVMScriptSpec)
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()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*KernelChaos) GetChaos ¶
func (in *KernelChaos) GetChaos() *ChaosInstance
GetChaos would return the a record for chaos
func (*KernelChaos) GetDuration ¶
func (in *KernelChaos) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
func (*KernelChaos) GetNextRecover ¶
func (in *KernelChaos) GetNextRecover() time.Time
func (*KernelChaos) GetNextStart ¶
func (in *KernelChaos) GetNextStart() time.Time
func (*KernelChaos) GetScheduler ¶
func (in *KernelChaos) GetScheduler() *SchedulerSpec
GetScheduler would return the scheduler for chaos
func (*KernelChaos) GetSelectSpec ¶ added in v1.1.2
func (in *KernelChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*KernelChaos) GetSpecAndMetaString ¶ added in v1.1.2
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) IsPaused ¶
func (in *KernelChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (*KernelChaos) SetNextRecover ¶
func (in *KernelChaos) SetNextRecover(t time.Time)
func (*KernelChaos) SetNextStart ¶
func (in *KernelChaos) SetNextStart(t time.Time)
func (*KernelChaos) Validate ¶
func (in *KernelChaos) Validate() error
Validate validates chaos object
func (*KernelChaos) ValidateCreate ¶
func (in *KernelChaos) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*KernelChaos) ValidateDelete ¶
func (in *KernelChaos) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*KernelChaos) ValidatePodMode ¶
func (in *KernelChaos) ValidatePodMode(spec *field.Path) field.ErrorList
ValidatePodMode validates the value with podmode
func (*KernelChaos) ValidateScheduler ¶
func (in *KernelChaos) ValidateScheduler(spec *field.Path) field.ErrorList
ValidateScheduler validates the scheduler and duration
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) DeepCopyObject ¶
func (in *KernelChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*KernelChaosList) ListChaos ¶
func (in *KernelChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of chaos
type KernelChaosSpec ¶
type KernelChaosSpec struct { // 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 PodMode `json:"mode"` // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. // If `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional Value string `json:"value"` // Selector is used to select pods that are used to inject chaos action. Selector SelectorSpec `json:"selector"` // FailKernRequest defines the request of kernel injection FailKernRequest FailKernRequest `json:"failKernRequest"` // Duration represents the duration of the chaos action Duration *string `json:"duration,omitempty"` // Scheduler defines some schedule rules to control the running time of the chaos experiment about time. Scheduler *SchedulerSpec `json:"scheduler,omitempty"` }
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) GetMode ¶
func (in *KernelChaosSpec) GetMode() PodMode
GetMode is a getter for Mode (for implementing SelectSpec)
func (*KernelChaosSpec) GetSelector ¶
func (in *KernelChaosSpec) GetSelector() SelectorSpec
GetSelector is a getter for Selector (for implementing SelectSpec)
func (*KernelChaosSpec) GetValue ¶
func (in *KernelChaosSpec) GetValue() string
GetValue is a getter for Value (for implementing SelectSpec)
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 ¶ added in v1.1.0
type LabelSelectorRequirements []metav1.LabelSelectorRequirement
LabelSelectorRequirements is list of LabelSelectorRequirement
func (LabelSelectorRequirements) DeepCopy ¶ added in v1.1.0
func (in LabelSelectorRequirements) DeepCopy() LabelSelectorRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirements.
func (LabelSelectorRequirements) DeepCopyInto ¶ added in v1.1.0
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 ¶
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 Matcher ¶ added in v1.1.0
type Matcher struct { Name string `json:"name"` ExactMatch *string `json:"exact_match,omitempty"` RegexMatch *string `json:"regex_match,omitempty"` SafeRegexMatch *string `json:"safe_regex_match,omitempty"` RangeMatch *string `json:"range_match,omitempty"` PresentMatch *string `json:"present_match,omitempty"` PrefixMatch *string `json:"prefix_match,omitempty"` SuffixMatch *string `json:"suffix_match,omitempty"` InvertMatch *string `json:"invert_match,omitempty"` }
func (*Matcher) DeepCopy ¶ added in v1.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matcher.
func (*Matcher) DeepCopyInto ¶ added in v1.1.0
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" mapstructure:",squash"` // 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 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()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*NetworkChaos) GetChaos ¶
func (in *NetworkChaos) GetChaos() *ChaosInstance
GetChaos would return the a record for chaos
func (*NetworkChaos) GetDuration ¶
func (in *NetworkChaos) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
func (*NetworkChaos) GetNextRecover ¶
func (in *NetworkChaos) GetNextRecover() time.Time
func (*NetworkChaos) GetNextStart ¶
func (in *NetworkChaos) GetNextStart() time.Time
func (*NetworkChaos) GetScheduler ¶
func (in *NetworkChaos) GetScheduler() *SchedulerSpec
GetScheduler would return the scheduler for chaos
func (*NetworkChaos) GetSelectSpec ¶ added in v1.1.2
func (in *NetworkChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*NetworkChaos) GetSpecAndMetaString ¶ added in v1.1.2
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) IsPaused ¶
func (in *NetworkChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (*NetworkChaos) SetNextRecover ¶
func (in *NetworkChaos) SetNextRecover(t time.Time)
func (*NetworkChaos) SetNextStart ¶
func (in *NetworkChaos) SetNextStart(t time.Time)
func (*NetworkChaos) Validate ¶
func (in *NetworkChaos) Validate() error
Validate validates chaos object
func (*NetworkChaos) ValidateCreate ¶
func (in *NetworkChaos) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*NetworkChaos) ValidateDelete ¶
func (in *NetworkChaos) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*NetworkChaos) ValidatePodMode ¶
func (in *NetworkChaos) ValidatePodMode(spec *field.Path) field.ErrorList
ValidatePodMode validates the value with podmode
func (*NetworkChaos) ValidateScheduler ¶
func (in *NetworkChaos) ValidateScheduler(spec *field.Path) field.ErrorList
ValidateScheduler validates the scheduler and duration
func (*NetworkChaos) ValidateTargets ¶ added in v1.1.2
func (in *NetworkChaos) ValidateTargets(target *field.Path) field.ErrorList
ValidateTargets validates externalTargets and Targets
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) DeepCopyObject ¶
func (in *NetworkChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*NetworkChaosList) ListChaos ¶
func (in *NetworkChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of chaos
type NetworkChaosSpec ¶
type NetworkChaosSpec struct { // 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"` // 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 PodMode `json:"mode"` // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. // If `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional Value string `json:"value"` // Selector is used to select pods that are used to inject chaos action. Selector SelectorSpec `json:"selector"` // Duration represents the duration of the chaos action Duration *string `json:"duration,omitempty"` // Scheduler defines some schedule rules to control the running time of the chaos experiment about network. Scheduler *SchedulerSpec `json:"scheduler,omitempty"` // TcParameter represents the traffic control definition TcParameter `json:",inline"` // Direction represents the direction, this applies on netem and network partition action // +optional // +kubebuilder:validation:Enum=to;from;both;"" Direction Direction `json:"direction,omitempty"` // Target represents network target, this applies on netem and network partition action // +optional Target *Target `json:"target,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) DefaultDelay ¶
func (in *NetworkChaosSpec) DefaultDelay()
DefaultDelay set the default value if Jitter or Correlation is not set
func (*NetworkChaosSpec) GetMode ¶
func (in *NetworkChaosSpec) GetMode() PodMode
GetMode is a getter for Mode (for implementing SelectSpec)
func (*NetworkChaosSpec) GetSelector ¶
func (in *NetworkChaosSpec) GetSelector() SelectorSpec
GetSelector is a getter for Selector (for implementing SelectSpec)
func (*NetworkChaosSpec) GetValue ¶
func (in *NetworkChaosSpec) GetValue() string
GetValue is a getter for Value (for implementing SelectSpec)
type NetworkChaosStatus ¶
type NetworkChaosStatus struct {
ChaosStatus `json:",inline"`
}
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 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) Default ¶
func (in *PodChaos) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*PodChaos) GetChaos ¶
func (in *PodChaos) GetChaos() *ChaosInstance
GetChaos would return the a record for chaos
func (*PodChaos) GetDuration ¶
GetDuration would return the duration for chaos
func (*PodChaos) GetNextRecover ¶
func (*PodChaos) GetNextStart ¶
func (*PodChaos) GetScheduler ¶
func (in *PodChaos) GetScheduler() *SchedulerSpec
GetScheduler would return the scheduler for chaos
func (*PodChaos) GetSelectSpec ¶ added in v1.1.2
func (in *PodChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*PodChaos) GetSpecAndMetaString ¶ added in v1.1.2
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) SetNextRecover ¶
func (*PodChaos) SetNextStart ¶
func (*PodChaos) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*PodChaos) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*PodChaos) ValidatePodMode ¶
ValidatePodMode validates the value with podmode
func (*PodChaos) ValidateScheduler ¶
ValidateScheduler validates the scheduler and duration
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) DeepCopyObject ¶
func (in *PodChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PodChaosList) ListChaos ¶
func (in *PodChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of chaos
type PodChaosSpec ¶
type PodChaosSpec struct { // Selector is used to select pods that are used to inject chaos action. Selector SelectorSpec `json:"selector"` // Scheduler defines some schedule rules to // control the running time of the chaos experiment about pods. Scheduler *SchedulerSpec `json:"scheduler,omitempty"` // 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"` // 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 PodMode `json:"mode"` // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. // IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional Value string `json:"value"` // 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"` // ContainerName indicates the name of the container. // Needed in container-kill. // +optional ContainerName string `json:"containerName"` // 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) GetMode ¶
func (in *PodChaosSpec) GetMode() PodMode
func (*PodChaosSpec) GetSelector ¶
func (in *PodChaosSpec) GetSelector() SelectorSpec
func (*PodChaosSpec) GetValue ¶
func (in *PodChaosSpec) GetValue() string
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 PodIoChaos ¶ added in v1.0.0
type PodIoChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PodIoChaosSpec `json:"spec,omitempty"` }
PodIoChaos is the Schema for the podiochaos API
func (*PodIoChaos) DeepCopy ¶ added in v1.0.0
func (in *PodIoChaos) DeepCopy() *PodIoChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIoChaos.
func (*PodIoChaos) DeepCopyInto ¶ added in v1.0.0
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 ¶ added in v1.0.0
func (in *PodIoChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PodIoChaos) SetupWebhookWithManager ¶ added in v1.0.0
func (in *PodIoChaos) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager setup PodIoChaos's webhook with manager
type PodIoChaosHandler ¶ added in v1.0.0
type PodIoChaosHandler interface {
Apply(context.Context, *PodIoChaos) error
}
PodIoChaosHandler represents the implementation of podiochaos
type PodIoChaosList ¶ added in v1.0.0
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 ¶ added in v1.0.0
func (in *PodIoChaosList) DeepCopy() *PodIoChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIoChaosList.
func (*PodIoChaosList) DeepCopyInto ¶ added in v1.0.0
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 ¶ added in v1.0.0
func (in *PodIoChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodIoChaosSpec ¶ added in v1.0.0
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"` // 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"` // Actions are a list of IoChaos actions // +optional Actions []IoChaosAction `json:"actions,omitempty"` }
PodIoChaosSpec defines the desired state of IoChaos
func (*PodIoChaosSpec) DeepCopy ¶ added in v1.0.0
func (in *PodIoChaosSpec) DeepCopy() *PodIoChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIoChaosSpec.
func (*PodIoChaosSpec) DeepCopyInto ¶ added in v1.0.0
func (in *PodIoChaosSpec) DeepCopyInto(out *PodIoChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodIoChaosWebhookRunner ¶ added in v1.0.0
type PodIoChaosWebhookRunner struct {
// contains filtered or unexported fields
}
PodIoChaosWebhookRunner runs webhook for podiochaos
func (*PodIoChaosWebhookRunner) Handle ¶ added in v1.0.0
func (r *PodIoChaosWebhookRunner) Handle(ctx context.Context, req admission.Request) admission.Response
Handle will run poiochaoshandler for this resource
func (*PodIoChaosWebhookRunner) InjectDecoder ¶ added in v1.0.0
func (r *PodIoChaosWebhookRunner) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects decoder into webhook runner
type PodMode ¶
type PodMode string
PodMode represents the mode to run pod chaos action.
const ( // OnePodMode represents that the system will do the chaos action on one pod selected randomly. OnePodMode PodMode = "one" // AllPodMode represents that the system will do the chaos action on all pods // regardless of status (not ready or not running pods includes). // Use this label carefully. AllPodMode PodMode = "all" // FixedPodMode represents that the system will do the chaos action on a specific number of running pods. FixedPodMode PodMode = "fixed" // FixedPercentPodMode to specify a fixed % that can be inject chaos action. FixedPercentPodMode PodMode = "fixed-percent" // RandomMaxPercentPodMode to specify a maximum % that can be inject chaos action. RandomMaxPercentPodMode PodMode = "random-max-percent" )
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()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*PodNetworkChaos) GetChaos ¶
func (in *PodNetworkChaos) GetChaos() *ChaosInstance
GetChaos returns a chaos instance
func (*PodNetworkChaos) GetSelectSpec ¶ added in v1.1.2
func (in *PodNetworkChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*PodNetworkChaos) GetStatus ¶
func (in *PodNetworkChaos) GetStatus() *ChaosStatus
GetStatus returns the status of chaos
func (*PodNetworkChaos) SetupWebhookWithManager ¶
func (in *PodNetworkChaos) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager setup PodNetworkChaos's webhook with manager
func (*PodNetworkChaos) ValidateCreate ¶
func (in *PodNetworkChaos) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
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 PodNetworkChaosHandler ¶
type PodNetworkChaosHandler interface {
Apply(context.Context, *PodNetworkChaos) error
}
PodNetworkChaosHandler represents the implementation of podnetworkchaos
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.
func (*PodNetworkChaosList) ListChaos ¶
func (in *PodNetworkChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of network chaos
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 {
ChaosStatus `json:",inline"`
}
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 PodStatus ¶
type PodStatus struct { Namespace string `json:"namespace"` Name string `json:"name"` Action string `json:"action"` HostIP string `json:"hostIP"` PodIP string `json:"podIP"` // A brief CamelCase message indicating details about the chaos action. // e.g. "delete this pod" or "pause this pod duration 5m" // +optional Message string `json:"message"` }
PodStatus represents information about the status of a pod in chaos experiment.
func (*PodStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatus.
func (*PodStatus) DeepCopyInto ¶
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 IPSets []string `json:"ipsets"` // The block direction of this iptables rule Direction ChainDirection `json:"direction"` 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"` }
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 ReorderSpec ¶
type ReorderSpec struct { Reorder string `json:"reorder"` Correlation string `json:"correlation"` 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 ScheduleStatus ¶
type ScheduleStatus struct { // Next time when this action will be applied again // +optional NextStart *metav1.Time `json:"nextStart,omitempty"` // Next time when this action will be recovered // +optional NextRecover *metav1.Time `json:"nextRecover,omitempty"` }
ScheduleStatus is the current status of chaos scheduler.
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 SchedulerSpec ¶
type SchedulerSpec struct { // Cron defines a cron job rule. // // Some rule examples: // "0 30 * * * *" means to "Every hour on the half hour" // "@hourly" means to "Every hour" // "@every 1h30m" means to "Every hour thirty" // // More rule info: https://godoc.org/github.com/robfig/cron Cron string `json:"cron"` }
SchedulerSpec defines information about schedule of the chaos experiment.
func (*SchedulerSpec) DeepCopy ¶
func (in *SchedulerSpec) DeepCopy() *SchedulerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerSpec.
func (*SchedulerSpec) DeepCopyInto ¶
func (in *SchedulerSpec) DeepCopyInto(out *SchedulerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SelectSpec ¶ added in v1.1.2
type SelectSpec interface { GetSelector() SelectorSpec GetMode() PodMode GetValue() string }
SelectSpec defines a common interface for selector
type SelectorSpec ¶
type SelectorSpec struct { // Namespaces is a set of namespace to which objects belong. // +optional Namespaces []string `json:"namespaces,omitempty"` // 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"` // Map of string keys and values that can be used to select objects. // A selector based on fields. // +optional FieldSelectors map[string]string `json:"fieldSelectors,omitempty"` // Map of string keys and values that can be used to select objects. // A selector based on labels. // +optional LabelSelectors map[string]string `json:"labelSelectors,omitempty"` // a slice of label selector expressions that can be used to select objects. // A list of selectors based on set-based label expressions. // +optional ExpressionSelectors LabelSelectorRequirements `json:"expressionSelectors,omitempty"` // Map of string keys and values that can be used to select objects. // A selector based on annotations. // +optional AnnotationSelectors map[string]string `json:"annotationSelectors,omitempty"` // 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"` }
SelectorSpec defines the some selectors to select objects. If the all selectors are empty, all objects will be used in chaos experiment.
func (SelectorSpec) AffectedNamespaces ¶ added in v1.1.2
func (s SelectorSpec) AffectedNamespaces() []string
AffectedNamespaces returns all the namespaces which the selector effect
func (SelectorSpec) ClusterScoped ¶ added in v1.1.2
func (s SelectorSpec) ClusterScoped() bool
ClusterScoped returns true if the selector selects Pods in the cluster
func (*SelectorSpec) DeepCopy ¶
func (in *SelectorSpec) DeepCopy() *SelectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectorSpec.
func (*SelectorSpec) DeepCopyInto ¶
func (in *SelectorSpec) DeepCopyInto(out *SelectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SelectorSpec) DefaultNamespace ¶
func (in *SelectorSpec) DefaultNamespace(namespace string)
DefaultNamespace set the namespace of chaos object as the default namespace selector if namespaces not set
type ServletCommonParameter ¶ added in v1.1.0
type ServletCommonParameter struct { // Method represents HTTP request method, such as GET, POST, DELETE or PUT. Default is GET // +kubebuilder:validation:Enum=GET;POST;PUT;DELETE // +optional Method string `json:"method"` // QueryString represents HTTP request query string // +optional QueryString string `json:"querystring"` // RequestPath represents HTTP request path. The path should start with / RequestPath string `json:"requestpath"` }
ServletCommonParameter represents the common servlet chaos parameter
func (*ServletCommonParameter) DeepCopy ¶ added in v1.1.0
func (in *ServletCommonParameter) DeepCopy() *ServletCommonParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServletCommonParameter.
func (*ServletCommonParameter) DeepCopyInto ¶ added in v1.1.0
func (in *ServletCommonParameter) DeepCopyInto(out *ServletCommonParameter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServletDelaySpec ¶ added in v1.1.0
type ServletDelaySpec struct { // ServletCommonParameter represents the common servlet chaos parameter ServletCommonParameter `json:",inline"` // Time represents delay time, in milliseconds, required Time int `json:"time"` // Offset represents delay fluctuation time // +optional Offset int `json:"offset"` }
ServletDelaySpec represents the detail about JVM chaos action of Servlet response delay
func (*ServletDelaySpec) DeepCopy ¶ added in v1.1.0
func (in *ServletDelaySpec) DeepCopy() *ServletDelaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServletDelaySpec.
func (*ServletDelaySpec) DeepCopyInto ¶ added in v1.1.0
func (in *ServletDelaySpec) DeepCopyInto(out *ServletDelaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServletExceptionSpec ¶ added in v1.1.0
type ServletExceptionSpec struct { // ServletCommonParameter represents the common servlet chaos parameter ServletCommonParameter `json:",inline"` // Exception represents the Exception class, with the full package name, must inherit from java.lang.Exception or Java.lang.Exception itself Exception string `json:"exception"` // Message represents specifies the exception class information. // +optional Message string `json:"message"` }
ServletExceptionSpec represents the detail about JVM chaos action of Servlet throwing custom exceptions
func (*ServletExceptionSpec) DeepCopy ¶ added in v1.1.0
func (in *ServletExceptionSpec) DeepCopy() *ServletExceptionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServletExceptionSpec.
func (*ServletExceptionSpec) DeepCopyInto ¶ added in v1.1.0
func (in *ServletExceptionSpec) DeepCopyInto(out *ServletExceptionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatefulObject ¶
type StatefulObject interface { runtime.Object GetStatus() *ChaosStatus }
StatefulObject defines a basic Object that can get the status
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()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*StressChaos) GetChaos ¶
func (in *StressChaos) GetChaos() *ChaosInstance
GetChaos would return the a record for chaos
func (*StressChaos) GetDuration ¶
func (in *StressChaos) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
func (*StressChaos) GetNextRecover ¶
func (in *StressChaos) GetNextRecover() time.Time
func (*StressChaos) GetNextStart ¶
func (in *StressChaos) GetNextStart() time.Time
func (*StressChaos) GetScheduler ¶
func (in *StressChaos) GetScheduler() *SchedulerSpec
GetScheduler would return the scheduler for chaos
func (*StressChaos) GetSelectSpec ¶ added in v1.1.2
func (in *StressChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*StressChaos) GetSpecAndMetaString ¶ added in v1.1.2
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) IsPaused ¶
func (in *StressChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (*StressChaos) SetNextRecover ¶
func (in *StressChaos) SetNextRecover(t time.Time)
func (*StressChaos) SetNextStart ¶
func (in *StressChaos) SetNextStart(t time.Time)
func (*StressChaos) Validate ¶
func (in *StressChaos) Validate() error
Validate validates chaos object
func (*StressChaos) ValidateCreate ¶
func (in *StressChaos) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*StressChaos) ValidateDelete ¶
func (in *StressChaos) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*StressChaos) ValidatePodMode ¶
func (in *StressChaos) ValidatePodMode(spec *field.Path) field.ErrorList
ValidatePodMode validates the value with podmode
func (*StressChaos) ValidateScheduler ¶
func (in *StressChaos) ValidateScheduler(spec *field.Path) field.ErrorList
ValidateScheduler validates whether scheduler is well defined
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) DeepCopyObject ¶
func (in *StressChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*StressChaosList) ListChaos ¶
func (in *StressChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of chaos
type StressChaosSpec ¶
type StressChaosSpec struct { // Mode defines the mode to run chaos action. // Supported mode: one / all / fixed / fixed-percent / random-max-percent Mode PodMode `json:"mode"` // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the max % of pods the server can do chaos action. // If `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the % of pods to do chaos action // +optional Value string `json:"value"` // Selector is used to select pods that are used to inject chaos action. Selector SelectorSpec `json:"selector"` // 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"` // ContainerName indicates the target container to inject stress in // +optional ContainerName *string `json:"containerName,omitempty"` // Duration represents the duration of the chaos action // +optional Duration *string `json:"duration,omitempty"` // Scheduler defines some schedule rules to control the running time of the chaos experiment about time. // +optional Scheduler *SchedulerSpec `json:"scheduler,omitempty"` }
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) GetMode ¶
func (in *StressChaosSpec) GetMode() PodMode
GetMode is a getter for Mode (for implementing SelectSpec)
func (*StressChaosSpec) GetSelector ¶
func (in *StressChaosSpec) GetSelector() SelectorSpec
GetSelector is a getter for Selector (for implementing SelectSpec)
func (*StressChaosSpec) GetValue ¶
func (in *StressChaosSpec) GetValue() string
GetValue is a getter for Value (for implementing SelectSpec)
type StressChaosStatus ¶
type StressChaosStatus struct { ChaosStatus `json:",inline"` // Instances always specifies stressing instances // +optional Instances map[string]StressInstance `json:"instances,omitempty"` }
StressChaosStatus defines the observed state of StressChaos
func (*StressChaosStatus) DeepCopy ¶
func (in *StressChaosStatus) DeepCopy() *StressChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressChaosStatus.
func (*StressChaosStatus) DeepCopyInto ¶
func (in *StressChaosStatus) DeepCopyInto(out *StressChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StressInstance ¶
type StressInstance struct { // UID is the instance identifier // +optional UID string `json:"uid"` // StartTime specifies when the instance starts // +optional StartTime *metav1.Time `json:"startTime"` }
StressInstance is an instance generates stresses
func (*StressInstance) DeepCopy ¶
func (in *StressInstance) DeepCopy() *StressInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressInstance.
func (*StressInstance) DeepCopyInto ¶
func (in *StressInstance) DeepCopyInto(out *StressInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Stressor ¶
type Stressor struct { // Workers specifies N workers to apply the stressor. 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" mapstructure:"memory"` // CPUStressor stresses CPU out // +optional CPUStressor *CPUStressor `json:"cpu,omitempty" mapstructure:"cpu"` }
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 Target ¶
type Target struct { // TargetSelector defines the target selector TargetSelector SelectorSpec `json:"selector" mapstructure:"selector"` // TargetMode defines the target selector mode // +kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent;"" TargetMode PodMode `json:"mode" mapstructure:"mode"` // TargetValue is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. // If `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional TargetValue string `json:"value" mapstructure:"value"` }
Target represents network partition and netem action target.
func (*Target) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target.
func (*Target) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Target) GetSelector ¶
func (in *Target) GetSelector() SelectorSpec
GetSelector is a getter for Selector (for implementing SelectSpec)
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 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) Default ¶
func (in *TimeChaos) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*TimeChaos) GetChaos ¶
func (in *TimeChaos) GetChaos() *ChaosInstance
GetChaos would return the a record for chaos
func (*TimeChaos) GetDuration ¶
GetDuration would return the duration for chaos
func (*TimeChaos) GetNextRecover ¶
func (*TimeChaos) GetNextStart ¶
func (*TimeChaos) GetScheduler ¶
func (in *TimeChaos) GetScheduler() *SchedulerSpec
GetScheduler would return the scheduler for chaos
func (*TimeChaos) GetSelectSpec ¶ added in v1.1.2
func (in *TimeChaos) GetSelectSpec() []SelectSpec
SelectSpec returns the selector config for authority validate
func (*TimeChaos) GetSpecAndMetaString ¶ added in v1.1.2
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) SetDefaultValue ¶
func (in *TimeChaos) SetDefaultValue()
SetDefaultValue will set default value for empty fields
func (*TimeChaos) SetNextRecover ¶
func (*TimeChaos) SetNextStart ¶
func (*TimeChaos) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*TimeChaos) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*TimeChaos) ValidatePodMode ¶
ValidatePodMode validates the value with podmode
func (*TimeChaos) ValidateScheduler ¶
ValidateScheduler validates the scheduler and duration
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) DeepCopyObject ¶
func (in *TimeChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*TimeChaosList) ListChaos ¶
func (in *TimeChaosList) ListChaos() []*ChaosInstance
ListChaos returns a list of chaos
type TimeChaosSpec ¶
type TimeChaosSpec struct { // 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 PodMode `json:"mode"` // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. // If `FixedPodMode`, provide an integer of pods to do chaos action. // If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. // If `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional Value string `json:"value"` // Selector is used to select pods that are used to inject chaos action. Selector SelectorSpec `json:"selector"` // 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"` // 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"` // ContainerName indicates the name of affected container. // If not set, all containers will be injected // +optional ContainerNames []string `json:"containerNames,omitempty"` // Duration represents the duration of the chaos action Duration *string `json:"duration,omitempty"` // Scheduler defines some schedule rules to control the running time of the chaos experiment about time. Scheduler *SchedulerSpec `json:"scheduler,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) DefaultClockIds ¶
func (in *TimeChaosSpec) DefaultClockIds()
DefaultClockIds will set default value for empty ClockIds fields
func (*TimeChaosSpec) GetMode ¶
func (in *TimeChaosSpec) GetMode() PodMode
GetMode is a getter for Mode (for implementing SelectSpec)
func (*TimeChaosSpec) GetSelector ¶
func (in *TimeChaosSpec) GetSelector() SelectorSpec
GetSelector is a getter for Selector (for implementing SelectSpec)
func (*TimeChaosSpec) GetValue ¶
func (in *TimeChaosSpec) GetValue() string
GetValue is a getter for Value (for implementing SelectSpec)
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 Timespec ¶ added in v1.0.0
Timespec represents a time
func (*Timespec) DeepCopy ¶ added in v1.0.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timespec.
func (*Timespec) DeepCopyInto ¶ added in v1.0.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files
¶
- common_types.go
- common_validation.go
- common_webhook.go
- dnschaos_type.go
- dnschaos_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
- kernelchaos_webhook.go
- kinds.go
- networkchaos_types.go
- networkchaos_webhook.go
- podchaos_types.go
- podchaos_webhook.go
- podiochaos_types.go
- podiochaos_webhook.go
- podnetworkchaos_types.go
- podnetworkchaos_webhook.go
- stresschaos_types.go
- stresschaos_webhook.go
- timechaos_types.go
- timechaos_webhook.go
- zz_generated.chaosmesh.go
- zz_generated.deepcopy.go