const ( // PauseAnnotationKey defines the annotation used to pause a chaos PauseAnnotationKey = "experiment.chaos-mesh.org/pause" LabelManagedBy = "managed-by" )
const ( // DefaultJitter defines default value for jitter DefaultJitter = "0ms" // DefaultCorrelation defines default value for correlation DefaultCorrelation = "0" )
const ( MethodGet = "GET" MethodPost = "POST" )
const ( // TemplateTypeLabelKey is a label that represents the template type. TemplateTypeLabelKey = "template.chaos-mesh.org/type" // ManagedByLabelKey is a label that represents the tool being used // to manage the operation of the object. ManagedByLabelKey = "app.kubernetes.io/managed-by" // ManagedByLabelValue is the value that represents the object is // managed by Chaos Mesh. ManagedByLabelValue = "chaos-mesh" // TemplateNameAnnotationKey is an annotation that represents // the real name of the template. TemplateNameAnnotationKey = "template.chaos-mesh.org/name" // TemplateDescriptionAnnotationKey is an annotation that represents // the description of the template. TemplateDescriptionAnnotationKey = "template.chaos-mesh.org/description" // PrefixStatusCheckTemplate is the prefix of the name of a StatusCheckTemplate. PrefixStatusCheckTemplate = "template-status-check" // StatusCheckTemplateKey is the key that status check spec // saved in the template ConfigMap. StatusCheckTemplateKey = "spec" )
const ( LabelControlledBy = "chaos-mesh.org/controlled-by" LabelWorkflow = "chaos-mesh.org/workflow" WorkflowAnnotationAbort = "workflow.chaos-mesh.org/abort" )
Reasons
const ( EntryCreated string = "EntryCreated" InvalidEntry string = "InvalidEntry" WorkflowAccomplished string = "WorkflowAccomplished" NodeAccomplished string = "NodeAccomplished" NodesCreated string = "NodesCreated" NodeDeadlineExceed string = "NodeDeadlineExceed" NodeDeadlineNotExceed string = "NodeDeadlineNotExceed" NodeDeadlineOmitted string = "NodeDeadlineOmitted" ParentNodeDeadlineExceed string = "ParentNodeDeadlineExceed" ChaosCRCreated string = "ChaosCRCreated" ChaosCRCreateFailed string = "ChaosCRCreateFailed" ChaosCRDeleted string = "ChaosCRDeleted" ChaosCRDeleteFailed string = "ChaosCRDeleteFailed" ChaosCRNotExists string = "ChaosCRNotExists" TaskPodSpawned string = "TaskPodSpawned" TaskPodSpawnFailed string = "TaskPodSpawnFailed" TaskPodPodCompleted string = "TaskPodPodCompleted" ConditionalBranchesSelected string = "ConditionalBranchesSelected" RerunBySpecChanged string = "RerunBySpecChanged" StatusCheckCreated string = "StatusCheckCreated" StatusCheckCreatedFailed string = "StatusCheckCreatedFailed" StatusCheckDeleted string = "StatusCheckDeleted" StatusCheckDeletedFailed string = "StatusCheckDeletedFailed" StatusCheckCompleted string = "StatusCheckCompleted" StatusCheckNotExceedSuccessThreshold string = "StatusCheckNotExceedSuccessThreshold" ParentNodeAborted string = "ParentNodeAborted" WorkflowAborted string = "WorkflowAborted" )
const DefaultJVMAgentPort int32 = 9277
const KindAWSChaos = "AWSChaos"
const KindAzureChaos = "AzureChaos"
const KindBlockChaos = "BlockChaos"
const KindDNSChaos = "DNSChaos"
const KindGCPChaos = "GCPChaos"
const KindHTTPChaos = "HTTPChaos"
const KindIOChaos = "IOChaos"
const KindJVMChaos = "JVMChaos"
const KindKernelChaos = "KernelChaos"
const KindNetworkChaos = "NetworkChaos"
const KindPhysicalMachine = "PhysicalMachine"
const KindPhysicalMachineChaos = "PhysicalMachineChaos"
const KindPodChaos = "PodChaos"
const KindPodHttpChaos = "PodHttpChaos"
const KindPodIOChaos = "PodIOChaos"
const KindPodNetworkChaos = "PodNetworkChaos"
const KindRemoteCluster = "RemoteCluster"
const KindSchedule = "Schedule"
const KindStatusCheck = "StatusCheck"
const KindStressChaos = "StressChaos"
const KindTimeChaos = "TimeChaos"
const KindWorkflow = "Workflow"
const KindWorkflowNode = "WorkflowNode"
const ( // ValidateValueParseError defines the error message for value parse error ValidateValueParseError = "parse value field error:%s" )
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "chaos-mesh.org", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var AWSChaosWebhookLog = logf.Log.WithName("AWSChaos-resource")
var AzureChaosWebhookLog = logf.Log.WithName("AzureChaos-resource")
var BlockChaosWebhookLog = logf.Log.WithName("BlockChaos-resource")
var DNSChaosWebhookLog = logf.Log.WithName("DNSChaos-resource")
updating spec of a chaos will have no effect, we'd better reject it
var ErrCanNotUpdateChaos = errors.New("Cannot update chaos spec")
var GCPChaosWebhookLog = logf.Log.WithName("GCPChaos-resource")
var HTTPChaosWebhookLog = logf.Log.WithName("HTTPChaos-resource")
var IOChaosWebhookLog = logf.Log.WithName("IOChaos-resource")
var JVMChaosWebhookLog = logf.Log.WithName("JVMChaos-resource")
var KernelChaosWebhookLog = logf.Log.WithName("KernelChaos-resource")
var NetworkChaosWebhookLog = logf.Log.WithName("NetworkChaos-resource")
var PhysicalMachineChaosWebhookLog = logf.Log.WithName("PhysicalMachineChaos-resource")
var PhysicalMachineWebhookLog = logf.Log.WithName("PhysicalMachine-resource")
var PodChaosWebhookLog = logf.Log.WithName("PodChaos-resource")
var PodHttpChaosWebhookLog = logf.Log.WithName("PodHttpChaos-resource")
var PodIOChaosWebhookLog = logf.Log.WithName("PodIOChaos-resource")
var PodNetworkChaosWebhookLog = logf.Log.WithName("PodNetworkChaos-resource")
var RemoteClusterWebhookLog = logf.Log.WithName("RemoteCluster-resource")
var StandardCronParser = cron.NewParser( cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor, )
var StatusCheckWebhookLog = logf.Log.WithName("StatusCheck-resource")
var StressChaosWebhookLog = logf.Log.WithName("StressChaos-resource")
var TimeChaosWebhookLog = logf.Log.WithName("TimeChaos-resource")
var ValidOptions = map[string]bool{"XX": true, "NX": true, "GT": true, "LT": true}
func AllKinds() map[string]*ChaosKind
AllKinds returns all chaos kinds, key is name of Kind, value is an accessor for spawning Object and List
func AllKindsIncludeScheduleAndWorkflow() map[string]*ChaosKind
func AllScheduleItemKinds() map[string]*ChaosKind
AllKinds returns all chaos kinds.
func CheckPercent(p string, allowZero bool) bool
func CheckPid(pid int) error
func FetchChaosByTemplateType(templateType TemplateType) (runtime.Object, error)
func GenerateTemplateName(name string) string
func GetTemplateDescription(cm v1.ConfigMap) string
func GetTemplateName(cm v1.ConfigMap) string
func IsChaosTemplateType(target TemplateType) bool
func IsStatusCheckTemplate(cm v1.ConfigMap) bool
func ParseUnit(s string) (uint64, error)
ParseUnit parse a digit with unit such as "K" , "KiB", "KB", "c", "MiB", "MB", "M". If input string is a digit without unit , it will be regarded as a digit with unit M(1024*1024 bytes).
AWSChaos is the Schema for the awschaos API
type AWSChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AWSChaosSpec `json:"spec"` Status AWSChaosStatus `json:"status,omitempty"` }
func (in *AWSChaos) DeepCopy() *AWSChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSChaos.
func (in *AWSChaos) DeepCopyInto(out *AWSChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AWSChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AWSChaos) Default()
func (in *AWSChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (in *AWSChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *AWSChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *AWSChaos) GetSelectorSpecs() map[string]interface{}
func (in *AWSChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *AWSChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *AWSChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *AWSChaos) IsOneShot() bool
func (in *AWSChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *AWSChaos) Validate() ([]string, error)
func (in *AWSChaos) ValidateCreate() (admission.Warnings, error)
func (in *AWSChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *AWSChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
AWSChaosAction represents the chaos action about aws.
type AWSChaosAction string
const ( // Ec2Stop represents the chaos action of stopping ec2. Ec2Stop AWSChaosAction = "ec2-stop" // Ec2Restart represents the chaos action of restarting ec2. Ec2Restart AWSChaosAction = "ec2-restart" // DetachVolume represents the chaos action of detaching the volume of ec2. DetachVolume AWSChaosAction = "detach-volume" )
func (in *AWSChaosAction) Validate(root interface{}, path *field.Path) field.ErrorList
Validate validates aws chaos actions
AWSChaosList contains a list of AWSChaos
type AWSChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []AWSChaos `json:"items"` }
func (in *AWSChaosList) DeepCopy() *AWSChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSChaosList.
func (in *AWSChaosList) DeepCopyInto(out *AWSChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AWSChaosList) DeepCopyList() GenericChaosList
func (in *AWSChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AWSChaosList) GetItems() []GenericChaos
func (in *AWSChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
AWSChaosSpec is the content of the specification for an AWSChaos
type AWSChaosSpec struct { // Action defines the specific aws chaos action. // Supported action: ec2-stop / ec2-restart / detach-volume // Default action: ec2-stop // +kubebuilder:validation:Enum=ec2-stop;ec2-restart;detach-volume Action AWSChaosAction `json:"action"` // Duration represents the duration of the chaos action. // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // SecretName defines the name of kubernetes secret. // +optional SecretName *string `json:"secretName,omitempty" webhook:",nilable"` AWSSelector `json:",inline"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *AWSChaosSpec) DeepCopy() *AWSChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSChaosSpec.
func (in *AWSChaosSpec) DeepCopyInto(out *AWSChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AWSChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
AWSChaosStatus represents the status of an AWSChaos
type AWSChaosStatus struct { ChaosStatus `json:",inline"` }
func (in *AWSChaosStatus) DeepCopy() *AWSChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSChaosStatus.
func (in *AWSChaosStatus) DeepCopyInto(out *AWSChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AWSDeviceName string
func (in *AWSDeviceName) Validate(root interface{}, path *field.Path) field.ErrorList
type AWSSelector struct { // Endpoint indicates the endpoint of the aws server. Just used it in test now. // +ui:form:ignore // +optional Endpoint *string `json:"endpoint,omitempty"` // AWSRegion defines the region of aws. AWSRegion string `json:"awsRegion"` // Ec2Instance indicates the ID of the ec2 instance. Ec2Instance string `json:"ec2Instance"` // EbsVolume indicates the ID of the EBS volume. // Needed in detach-volume. // +ui:form:when=action=='detach-volume' // +optional EbsVolume *string `json:"volumeID,omitempty" webhook:"EbsVolume,nilable"` // DeviceName indicates the name of the device. // Needed in detach-volume. // +ui:form:when=action=='detach-volume' // +optional DeviceName *string `json:"deviceName,omitempty" webhook:"AWSDeviceName,nilable"` }
func (in *AWSSelector) DeepCopy() *AWSSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSSelector.
func (in *AWSSelector) DeepCopyInto(out *AWSSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (selector *AWSSelector) Id() string
AttrOverrideSpec represents an override of attribution
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"` }
func (in *AttrOverrideSpec) DeepCopy() *AttrOverrideSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttrOverrideSpec.
func (in *AttrOverrideSpec) DeepCopyInto(out *AttrOverrideSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
AzureChaos is the Schema for the azurechaos API
type AzureChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AzureChaosSpec `json:"spec"` Status AzureChaosStatus `json:"status,omitempty"` }
func (in *AzureChaos) DeepCopy() *AzureChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureChaos.
func (in *AzureChaos) DeepCopyInto(out *AzureChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzureChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AzureChaos) Default()
func (in *AzureChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (in *AzureChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *AzureChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *AzureChaos) GetSelectorSpecs() map[string]interface{}
func (in *AzureChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *AzureChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *AzureChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *AzureChaos) IsOneShot() bool
func (in *AzureChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *AzureChaos) Validate() ([]string, error)
func (in *AzureChaos) ValidateCreate() (admission.Warnings, error)
func (in *AzureChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *AzureChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
AzureChaosAction represents the chaos action about azure.
type AzureChaosAction string
const ( // AzureVmStop represents the chaos action of stopping vm. AzureVmStop AzureChaosAction = "vm-stop" // AzureVmRestart represents the chaos action of restarting vm. AzureVmRestart AzureChaosAction = "vm-restart" // AzureDiskDetach represents the chaos action of detaching the disk from vm. AzureDiskDetach AzureChaosAction = "disk-detach" )
func (in *AzureChaosAction) Validate(root interface{}, path *field.Path) field.ErrorList
Validate validates the azure chaos actions
AzureChaosList contains a list of AzureChaos
type AzureChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []AzureChaos `json:"items"` }
func (in *AzureChaosList) DeepCopy() *AzureChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureChaosList.
func (in *AzureChaosList) DeepCopyInto(out *AzureChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzureChaosList) DeepCopyList() GenericChaosList
func (in *AzureChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AzureChaosList) GetItems() []GenericChaos
func (in *AzureChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
AzureChaosSpec is the content of the specification for an AzureChaos
type AzureChaosSpec struct { // Action defines the specific azure chaos action. // Supported action: vm-stop / vm-restart / disk-detach // Default action: vm-stop // +kubebuilder:validation:Enum=vm-stop;vm-restart;disk-detach Action AzureChaosAction `json:"action"` // Duration represents the duration of the chaos action. // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` AzureSelector `json:",inline"` }
func (in *AzureChaosSpec) DeepCopy() *AzureChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureChaosSpec.
func (in *AzureChaosSpec) DeepCopyInto(out *AzureChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzureChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
AzureChaosStatus represents the status of an AzureChaos
type AzureChaosStatus struct { ChaosStatus `json:",inline"` }
func (in *AzureChaosStatus) DeepCopy() *AzureChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureChaosStatus.
func (in *AzureChaosStatus) DeepCopyInto(out *AzureChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AzureSelector struct { // SubscriptionID defines the id of Azure subscription. SubscriptionID string `json:"subscriptionID"` // ResourceGroupName defines the name of ResourceGroup ResourceGroupName string `json:"resourceGroupName"` // VMName defines the name of Virtual Machine VMName string `json:"vmName"` // DiskName indicates the name of the disk. // Needed in disk-detach. // +optional DiskName *string `json:"diskName,omitempty" webhook:"DiskName,nilable"` // LUN indicates the Logical Unit Number of the data disk. // Needed in disk-detach. // +optional LUN *int `json:"lun,omitempty" webhook:"LUN,nilable"` // SecretName defines the name of kubernetes secret. It is used for Azure credentials. // +optional SecretName *string `json:"secretName,omitempty"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *AzureSelector) DeepCopy() *AzureSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureSelector.
func (in *AzureSelector) DeepCopyInto(out *AzureSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (selector *AzureSelector) Id() string
BandwidthSpec defines detail of bandwidth limit.
type BandwidthSpec struct { // Rate is the speed knob. Allows bit, kbit, mbit, gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means bytes per second. Rate string `json:"rate" webhook:"Rate"` // Limit is the number of bytes that can be queued waiting for tokens to become available. // +kubebuilder:validation:Minimum=1 Limit uint32 `json:"limit"` // Buffer is the maximum amount of bytes that tokens can be available for instantaneously. // +kubebuilder:validation:Minimum=1 Buffer uint32 `json:"buffer"` // Peakrate is the maximum depletion rate of the bucket. // The peakrate does not need to be set, it is only necessary // if perfect millisecond timescale shaping is required. // +optional // +kubebuilder:validation:Minimum=0 Peakrate *uint64 `json:"peakrate,omitempty"` // Minburst specifies the size of the peakrate bucket. For perfect // accuracy, should be set to the MTU of the interface. If a // peakrate is needed, but some burstiness is acceptable, this // size can be raised. A 3000 byte minburst allows around 3mbit/s // of peakrate, given 1000 byte packets. // +optional // +kubebuilder:validation:Minimum=0 Minburst *uint32 `json:"minburst,omitempty"` }
func (in *BandwidthSpec) DeepCopy() *BandwidthSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BandwidthSpec.
func (in *BandwidthSpec) DeepCopyInto(out *BandwidthSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
BlockChaos is the Schema for the blockchaos API
type BlockChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BlockChaosSpec `json:"spec"` Status BlockChaosStatus `json:"status,omitempty"` }
func (in *BlockChaos) DeepCopy() *BlockChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockChaos.
func (in *BlockChaos) DeepCopyInto(out *BlockChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BlockChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *BlockChaos) Default()
func (in *BlockChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (obj *BlockChaos) GetCustomStatus() interface{}
func (in *BlockChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *BlockChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *BlockChaos) GetSelectorSpecs() map[string]interface{}
func (in *BlockChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *BlockChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *BlockChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *BlockChaos) IsOneShot() bool
func (in *BlockChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *BlockChaos) Validate() ([]string, error)
func (in *BlockChaos) ValidateCreate() (admission.Warnings, error)
func (in *BlockChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *BlockChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type BlockChaosAction string
const ( BlockDelay BlockChaosAction = "delay" )
BlockChaosList contains a list of BlockChaos
type BlockChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []BlockChaos `json:"items"` }
func (in *BlockChaosList) DeepCopy() *BlockChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockChaosList.
func (in *BlockChaosList) DeepCopyInto(out *BlockChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BlockChaosList) DeepCopyList() GenericChaosList
func (in *BlockChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *BlockChaosList) GetItems() []GenericChaos
func (in *BlockChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
BlockChaosSpec is the content of the specification for a BlockChaos
type BlockChaosSpec struct { // Action defines the specific block chaos action. // Supported action: delay // +kubebuilder:validation:Enum=delay Action BlockChaosAction `json:"action"` // Delay defines the delay distribution. // +optional Delay *BlockDelaySpec `json:"delay,omitempty"` ContainerNodeVolumePathSelector `json:",inline"` // Duration represents the duration of the chaos action. // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *BlockChaosSpec) DeepCopy() *BlockChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockChaosSpec.
func (in *BlockChaosSpec) DeepCopyInto(out *BlockChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BlockChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
func (in *BlockChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList
BlockChaosStatus represents the status of a BlockChaos
type BlockChaosStatus struct { ChaosStatus `json:",inline"` // InjectionIds always specifies the number of injected chaos action // +optional InjectionIds map[string]int `json:"ids,omitempty"` }
func (in *BlockChaosStatus) DeepCopy() *BlockChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockChaosStatus.
func (in *BlockChaosStatus) DeepCopyInto(out *BlockChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
BlockDelaySpec describes the block delay specification
type BlockDelaySpec struct { // Latency defines the latency of every io request. Latency string `json:"latency,omitempty" webhook:"Duration"` // +optional Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"` // +optional Jitter string `json:"jitter,omitempty" default:"0ms" webhook:"Duration"` }
func (in *BlockDelaySpec) DeepCopy() *BlockDelaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDelaySpec.
func (in *BlockDelaySpec) DeepCopyInto(out *BlockDelaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Bytes string
func (in *Bytes) Validate(root interface{}, path *field.Path) field.ErrorList
CPUStressor defines how to stress CPU out
type CPUStressor struct { Stressor `json:",inline"` // Load specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 // is full loading. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=100 // +optional Load *int `json:"load,omitempty"` // extend stress-ng options // +optional Options []string `json:"options,omitempty"` }
func (in *CPUStressor) DeepCopy() *CPUStressor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUStressor.
func (in *CPUStressor) DeepCopyInto(out *CPUStressor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
ChainDirection represents the direction of chain
type ChainDirection string
const ( // Input means this chain is linked with INPUT chain Input ChainDirection = "input" // Output means this chain is linked with OUTPUT chain Output ChainDirection = "output" )
type ChaosCondition struct { Type ChaosConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` // +optional Reason string `json:"reason,omitempty"` }
func (in *ChaosCondition) DeepCopy() *ChaosCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosCondition.
func (in *ChaosCondition) DeepCopyInto(out *ChaosCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChaosConditionType string
const ( ConditionSelected ChaosConditionType = "Selected" ConditionAllInjected ChaosConditionType = "AllInjected" ConditionAllRecovered ChaosConditionType = "AllRecovered" ConditionPaused ChaosConditionType = "Paused" )
ChaosKind includes one kind of chaos and its list type
type ChaosKind struct {
// contains filtered or unexported fields
}
func (it *ChaosKind) SpawnList() GenericChaosList
SpawnList will deepcopy a clean list for the acquired kind of chaos as placeholder
func (it *ChaosKind) SpawnObject() client.Object
SpawnObject will deepcopy a clean struct for the acquired kind as placeholder
ChaosOnlyScheduleSpec is very similar with ScheduleSpec, but it could not schedule Workflow because we could not resolve nested CRD now
type ChaosOnlyScheduleSpec struct { Schedule string `json:"schedule"` // +optional // +nullable // +kubebuilder:validation:Minimum=0 StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds"` // +optional // +kubebuilder:validation:Enum=Forbid;Allow ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy"` // +optional // +kubebuilder:validation:Minimum=1 HistoryLimit int `json:"historyLimit,omitempty"` Type ScheduleTemplateType `json:"type"` EmbedChaos `json:",inline"` }
func (in *ChaosOnlyScheduleSpec) DeepCopy() *ChaosOnlyScheduleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosOnlyScheduleSpec.
func (in *ChaosOnlyScheduleSpec) DeepCopyInto(out *ChaosOnlyScheduleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChaosStatus struct { // Conditions represents the current global condition of the chaos // +optional Conditions []ChaosCondition `json:"conditions,omitempty"` // Experiment records the last experiment state. Experiment ExperimentStatus `json:"experiment"` }
func (in *ChaosStatus) DeepCopy() *ChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChaosStatus.
func (in *ChaosStatus) DeepCopyInto(out *ChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
CidrAndPort represents CIDR and port pair
type CidrAndPort struct { Cidr string `json:"cidr"` // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 Port uint16 `json:"port"` }
func (in *CidrAndPort) DeepCopy() *CidrAndPort
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CidrAndPort.
func (in *CidrAndPort) DeepCopyInto(out *CidrAndPort)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClockIds []string
func (in ClockIds) DeepCopy() ClockIds
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClockIds.
func (in ClockIds) DeepCopyInto(out *ClockIds)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClockIds) Default(root interface{}, field *reflect.StructField)
DefaultClockIds will set default value for empty ClockIds fields
type ClockSpec struct { // the pid of target program. Pid int `json:"pid,omitempty"` // specifies the length of time offset. TimeOffset string `json:"time-offset,omitempty"` // the identifier of the particular clock on which to act. // More clock description in linux kernel can be found in man page of clock_getres, clock_gettime, clock_settime. // Muti clock ids should be split with "," ClockIdsSlice string `json:"clock-ids-slice,omitempty"` }
func (in *ClockSpec) DeepCopy() *ClockSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClockSpec.
func (in *ClockSpec) DeepCopyInto(out *ClockSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConcurrencyPolicy string
var ( ForbidConcurrent ConcurrencyPolicy = "Forbid" AllowConcurrent ConcurrencyPolicy = "Allow" )
func (in *ConcurrencyPolicy) Default()
func (c ConcurrencyPolicy) IsAllow() bool
func (c ConcurrencyPolicy) IsForbid() bool
type ConditionalBranch struct { // Target is the name of other template, if expression is evaluated as true, this template will be spawned. Target string `json:"target"` // Expression is the expression for this conditional branch, expected type of result is boolean. If expression is empty, this branch will always be selected/the template will be spawned. // +optional Expression string `json:"expression,omitempty"` }
func (in *ConditionalBranch) DeepCopy() *ConditionalBranch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalBranch.
func (in *ConditionalBranch) DeepCopyInto(out *ConditionalBranch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionalBranchStatus struct { Target string `json:"target"` EvaluationResult corev1.ConditionStatus `json:"evaluationResult"` }
func (in *ConditionalBranchStatus) DeepCopy() *ConditionalBranchStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalBranchStatus.
func (in *ConditionalBranchStatus) DeepCopyInto(out *ConditionalBranchStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionalBranchesStatus struct { // +optional Branches []ConditionalBranchStatus `json:"branches"` // +optional Context []string `json:"context"` }
func (in *ConditionalBranchesStatus) DeepCopy() *ConditionalBranchesStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionalBranchesStatus.
func (in *ConditionalBranchesStatus) DeepCopyInto(out *ConditionalBranchesStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
ContainerNodeVolumePathSelector is the selector to select a node and a PV on it
type ContainerNodeVolumePathSelector struct { ContainerSelector `json:",inline"` VolumeName string `json:"volumeName"` }
func (in *ContainerNodeVolumePathSelector) DeepCopy() *ContainerNodeVolumePathSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerNodeVolumePathSelector.
func (in *ContainerNodeVolumePathSelector) DeepCopyInto(out *ContainerNodeVolumePathSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContainerSelector struct { PodSelector `json:",inline"` // ContainerNames indicates list of the name of affected container. // If not set, the first container will be injected // +optional ContainerNames []string `json:"containerNames,omitempty"` }
func (in *ContainerSelector) DeepCopy() *ContainerSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSelector.
func (in *ContainerSelector) DeepCopyInto(out *ContainerSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+kubebuilder:object:generate=false
type ContainsDuration interface { GetDuration() (*time.Duration, error) }
CorruptSpec defines detail of a corrupt action
type CorruptSpec struct { Corrupt string `json:"corrupt" webhook:"FloatStr"` // +optional Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"` }
func (in *CorruptSpec) DeepCopy() *CorruptSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CorruptSpec.
func (in *CorruptSpec) DeepCopyInto(out *CorruptSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DNSChaos is the Schema for the networkchaos API
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,omitempty"` }
func (in *DNSChaos) DeepCopy() *DNSChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaos.
func (in *DNSChaos) DeepCopyInto(out *DNSChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DNSChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DNSChaos) Default()
func (in *DNSChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (in *DNSChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *DNSChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *DNSChaos) GetSelectorSpecs() map[string]interface{}
func (in *DNSChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *DNSChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *DNSChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *DNSChaos) IsOneShot() bool
func (in *DNSChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *DNSChaos) Validate() ([]string, error)
func (in *DNSChaos) ValidateCreate() (admission.Warnings, error)
func (in *DNSChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *DNSChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
DNSChaosAction represents the chaos action about DNS.
type DNSChaosAction string
const ( // ErrorAction represents get error when send DNS request. ErrorAction DNSChaosAction = "error" // RandomAction represents get random IP when send DNS request. RandomAction DNSChaosAction = "random" )
DNSChaosList contains a list of DNSChaos
type DNSChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DNSChaos `json:"items"` }
func (in *DNSChaosList) DeepCopy() *DNSChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaosList.
func (in *DNSChaosList) DeepCopyInto(out *DNSChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DNSChaosList) DeepCopyList() GenericChaosList
func (in *DNSChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *DNSChaosList) GetItems() []GenericChaos
func (in *DNSChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
DNSChaosSpec defines the desired state of DNSChaos
type DNSChaosSpec struct { // Action defines the specific DNS chaos action. // Supported action: error, random // Default action: error // +kubebuilder:validation:Enum=error;random Action DNSChaosAction `json:"action"` ContainerSelector `json:",inline"` // Duration represents the duration of the chaos action Duration *string `json:"duration,omitempty" webhook:"Duration"` // Choose which domain names to take effect, support the placeholder ? and wildcard *, or the Specified domain name. // Note: // 1. The wildcard * must be at the end of the string. For example, chaos-*.org is invalid. // 2. if the patterns is empty, will take effect on all the domain names. // For example: // The value is ["google.com", "github.*", "chaos-mes?.org"], // will take effect on "google.com", "github.com" and "chaos-mesh.org" // +optional DomainNamePatterns []string `json:"patterns,omitempty"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *DNSChaosSpec) DeepCopy() *DNSChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaosSpec.
func (in *DNSChaosSpec) DeepCopyInto(out *DNSChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DNSChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
DNSChaosStatus defines the observed state of DNSChaos
type DNSChaosStatus struct { ChaosStatus `json:",inline"` }
func (in *DNSChaosStatus) DeepCopy() *DNSChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSChaosStatus.
func (in *DNSChaosStatus) DeepCopyInto(out *DNSChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Delay string
func (in *Delay) Validate(root interface{}, path *field.Path) field.ErrorList
DelaySpec defines detail of a delay action
type DelaySpec struct { // +kubebuilder:validation:Pattern="^[0-9]+(\\.[0-9]+)?(ns|us|ms|s|m|h)$" Latency string `json:"latency" webhook:"Duration"` // +optional Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"` // +kubebuilder:validation:Pattern="^[0-9]+(\\.[0-9]+)?(ns|us|ms|s|m|h)$" // +optional Jitter string `json:"jitter,omitempty" default:"0ms" webhook:"Duration"` // +optional Reorder *ReorderSpec `json:"reorder,omitempty"` }
func (in *DelaySpec) DeepCopy() *DelaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DelaySpec.
func (in *DelaySpec) DeepCopyInto(out *DelaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DesiredPhase string
const ( // The target of `RunningPhase` is to make all selected targets (container or pod) into "Injected" phase RunningPhase DesiredPhase = "Run" // The target of `StoppedPhase` is to make all selected targets (container or pod) into "NotInjected" phase StoppedPhase DesiredPhase = "Stop" )
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 Direction string
const ( // To represents network packet from source to target To Direction = "to" // From represents network packet to source from target From Direction = "from" // Both represents both directions Both Direction = "both" )
func (in *Direction) Default(root interface{}, field *reflect.StructField)
type DiskFileSpec struct { // specifies how many units of data will write into the file path. support unit: c=1, w=2, b=512, kB=1000, // K=1024, MB=1000*1000, M=1024*1024, GB=1000*1000*1000, G=1024*1024*1024 BYTES. example : 1M | 512kB Size string `json:"size,omitempty"` // specifies the location to fill data in. if path not provided, // payload will read/write from/into a temp file, temp file will be deleted after writing Path string `json:"path,omitempty"` }
func (in *DiskFileSpec) DeepCopy() *DiskFileSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskFileSpec.
func (in *DiskFileSpec) DeepCopyInto(out *DiskFileSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DiskFillSpec struct { DiskFileSpec `json:",inline"` // fill disk by fallocate FillByFallocate bool `json:"fill-by-fallocate,omitempty"` }
func (in *DiskFillSpec) DeepCopy() *DiskFillSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskFillSpec.
func (in *DiskFillSpec) DeepCopyInto(out *DiskFillSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DiskName string
func (in *DiskName) Validate(root interface{}, path *field.Path) field.ErrorList
type DiskPayloadSpec struct { DiskFileSpec `json:",inline"` // specifies the number of process work on writing, default 1, only 1-255 is valid value PayloadProcessNum uint8 `json:"payload-process-num,omitempty"` }
func (in *DiskPayloadSpec) DeepCopy() *DiskPayloadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskPayloadSpec.
func (in *DiskPayloadSpec) DeepCopyInto(out *DiskPayloadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DuplicateSpec defines detail of a duplicate action
type DuplicateSpec struct { Duplicate string `json:"duplicate" webhook:"FloatStr"` // +optional Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"` }
func (in *DuplicateSpec) DeepCopy() *DuplicateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DuplicateSpec.
func (in *DuplicateSpec) DeepCopyInto(out *DuplicateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Duration string
func (d *Duration) Default(root interface{}, field *reflect.StructField)
func (d *Duration) Validate(root interface{}, path *field.Path) field.ErrorList
type EbsVolume string
func (in *EbsVolume) Validate(root interface{}, path *field.Path) field.ErrorList
type EmbedChaos struct { // +optional AWSChaos *AWSChaosSpec `json:"awsChaos,omitempty"` // +optional AzureChaos *AzureChaosSpec `json:"azureChaos,omitempty"` // +optional BlockChaos *BlockChaosSpec `json:"blockChaos,omitempty"` // +optional DNSChaos *DNSChaosSpec `json:"dnsChaos,omitempty"` // +optional GCPChaos *GCPChaosSpec `json:"gcpChaos,omitempty"` // +optional HTTPChaos *HTTPChaosSpec `json:"httpChaos,omitempty"` // +optional IOChaos *IOChaosSpec `json:"ioChaos,omitempty"` // +optional JVMChaos *JVMChaosSpec `json:"jvmChaos,omitempty"` // +optional KernelChaos *KernelChaosSpec `json:"kernelChaos,omitempty"` // +optional NetworkChaos *NetworkChaosSpec `json:"networkChaos,omitempty"` // +optional PhysicalMachineChaos *PhysicalMachineChaosSpec `json:"physicalmachineChaos,omitempty"` // +optional PodChaos *PodChaosSpec `json:"podChaos,omitempty"` // +optional StressChaos *StressChaosSpec `json:"stressChaos,omitempty"` // +optional TimeChaos *TimeChaosSpec `json:"timeChaos,omitempty"` }
func (in *EmbedChaos) DeepCopy() *EmbedChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbedChaos.
func (in *EmbedChaos) DeepCopyInto(out *EmbedChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (it *EmbedChaos) RestoreChaosSpec(root interface{}) error
func (it *EmbedChaos) SpawnNewList(templateType TemplateType) (GenericChaosList, error)
func (it *EmbedChaos) SpawnNewObject(templateType TemplateType) (GenericChaos, error)
func (in EmbedChaos) Validate(path *field.Path, chaosType string) field.ErrorList
type EmbedStatusCheck struct { // +optional HTTPStatusCheck *HTTPStatusCheck `json:"http,omitempty"` }
func (in *EmbedStatusCheck) DeepCopy() *EmbedStatusCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbedStatusCheck.
func (in *EmbedStatusCheck) DeepCopyInto(out *EmbedStatusCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExpInfo struct { // the experiment ID // +optional UID string `json:"uid,omitempty" swaggerignore:"true"` // the subAction, generate automatically // +optional Action string `json:"action,omitempty" swaggerignore:"true"` // +ui:form:when=action=='stress-cpu' // +optional StressCPU *StressCPUSpec `json:"stress-cpu,omitempty"` // +ui:form:when=action=='stress-mem' // +optional StressMemory *StressMemorySpec `json:"stress-mem,omitempty"` // +ui:form:when=action=='disk-read-payload' // +optional DiskReadPayload *DiskPayloadSpec `json:"disk-read-payload,omitempty"` // +ui:form:when=action=='disk-write-payload' // +optional DiskWritePayload *DiskPayloadSpec `json:"disk-write-payload,omitempty"` // +ui:form:when=action=='disk-fill' // +optional DiskFill *DiskFillSpec `json:"disk-fill,omitempty"` // +ui:form:when=action=='network-corrupt' // +optional NetworkCorrupt *NetworkCorruptSpec `json:"network-corrupt,omitempty"` // +ui:form:when=action=='network-duplicate' // +optional NetworkDuplicate *NetworkDuplicateSpec `json:"network-duplicate,omitempty"` // +ui:form:when=action=='network-loss' // +optional NetworkLoss *NetworkLossSpec `json:"network-loss,omitempty"` // +ui:form:when=action=='network-delay' // +optional NetworkDelay *NetworkDelaySpec `json:"network-delay,omitempty"` // +ui:form:when=action=='network-partition' // +optional NetworkPartition *NetworkPartitionSpec `json:"network-partition,omitempty"` // +ui:form:when=action=='network-dns' // +optional NetworkDNS *NetworkDNSSpec `json:"network-dns,omitempty"` // +ui:form:when=action=='network-bandwidth' // +optional NetworkBandwidth *NetworkBandwidthSpec `json:"network-bandwidth,omitempty"` // +ui:form:when=action=='network-flood' // +optional NetworkFlood *NetworkFloodSpec `json:"network-flood,omitempty"` // +ui:form:when=action=='network-down' // +optional NetworkDown *NetworkDownSpec `json:"network-down,omitempty"` // +ui:form:when=action=='process' // +optional Process *ProcessSpec `json:"process,omitempty"` // +ui:form:when=action=='jvm-exception' // +optional JVMException *JVMExceptionSpec `json:"jvm-exception,omitempty"` // +ui:form:when=action=='jvm-gc' // +optional JVMGC *JVMGCSpec `json:"jvm-gc,omitempty"` // +ui:form:when=action=='jvm-latency' // +optional JVMLatency *JVMLatencySpec `json:"jvm-latency,omitempty"` // +ui:form:when=action=='jvm-return' // +optional JVMReturn *JVMReturnSpec `json:"jvm-return,omitempty"` // +ui:form:when=action=='jvm-stress' // +optional JVMStress *JVMStressSpec `json:"jvm-stress,omitempty"` // +ui:form:when=action=='jvm-rule-data' // +optional JVMRuleData *JVMRuleDataSpec `json:"jvm-rule-data,omitempty"` // +ui:form:when=action=='jvm-mysql' // +optional JVMMySQL *PMJVMMySQLSpec `json:"jvm-mysql,omitempty"` // +ui:form:when=action=='clock' // +optional Clock *ClockSpec `json:"clock,omitempty"` // +ui:form:when=action=='redis-expiration' // +optional RedisExpiration *RedisExpirationSpec `json:"redis-expiration,omitempty"` // +ui:form:when=action=='redis-penetration' // +optional RedisPenetration *RedisPenetrationSpec `json:"redis-penetration,omitempty"` // +ui:form:when=action=='redis-cacheLimit' // +optional RedisCacheLimit *RedisCacheLimitSpec `json:"redis-cacheLimit,omitempty"` // +ui:form:when=action=='redis-restart' // +optional RedisSentinelRestart *RedisSentinelRestartSpec `json:"redis-restart,omitempty"` // +ui:form:when=action=='redis-stop' // +optional RedisSentinelStop *RedisSentinelStopSpec `json:"redis-stop,omitempty"` // +ui:form:when=action=='kafka-fill' // +optional KafkaFill *KafkaFillSpec `json:"kafka-fill,omitempty"` // +ui:form:when=action=='kafka-flood' // +optional KafkaFlood *KafkaFloodSpec `json:"kafka-flood,omitempty"` // +ui:form:when=action=='kafka-io' // +optional KafkaIO *KafkaIOSpec `json:"kafka-io,omitempty"` // +ui:form:when=action=='http-abort' // +optional HTTPAbort *HTTPAbortSpec `json:"http-abort,omitempty"` // +ui:form:when=action=='http-delay' // +optional HTTPDelay *HTTPDelaySpec `json:"http-delay,omitempty"` // +ui:form:when=action=='http-config' // +optional HTTPConfig *HTTPConfigSpec `json:"http-config,omitempty"` // +ui:form:when=action=='http-request' // +optional HTTPRequest *HTTPRequestSpec `json:"http-request,omitempty"` // +ui:form:when=action=='file-create' // +optional FileCreate *FileCreateSpec `json:"file-create,omitempty"` // +ui:form:when=action=='file-modify' // +optional FileModifyPrivilege *FileModifyPrivilegeSpec `json:"file-modify,omitempty"` // +ui:form:when=action=='file-delete' // +optional FileDelete *FileDeleteSpec `json:"file-delete,omitempty"` // +ui:form:when=action=='file-create' // +optional FileRename *FileRenameSpec `json:"file-rename,omitempty"` // +ui:form:when=action=='file-append' // +optional FileAppend *FileAppendSpec `json:"file-append,omitempty"` // +ui:form:when=action=='file-replace' // +optional FileReplace *FileReplaceSpec `json:"file-replace,omitempty"` // +ui:form:when=action=='vm' // +optional VM *VMSpec `json:"vm,omitempty"` // +ui:form:when=action=='user_defined' // +optional UserDefined *UserDefinedSpec `json:"user_defined,omitempty"` }
func (in *ExpInfo) DeepCopy() *ExpInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExpInfo.
func (in *ExpInfo) DeepCopyInto(out *ExpInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExperimentStatus struct { // +kubebuilder:validation:Enum=Run;Stop DesiredPhase `json:"desiredPhase,omitempty"` // +optional // Records are used to track the running status Records []*Record `json:"containerRecords,omitempty"` }
func (in *ExperimentStatus) DeepCopy() *ExperimentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentStatus.
func (in *ExperimentStatus) DeepCopyInto(out *ExperimentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
FailKernRequest defines the injection conditions
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"` }
func (in *FailKernRequest) DeepCopy() *FailKernRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailKernRequest.
func (in *FailKernRequest) DeepCopyInto(out *FailKernRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileAppendSpec struct { // FileName is the name of the file to be created, modified, deleted, renamed, or appended. FileName string `json:"file-name,omitempty"` // Data is the data for append. Data string `json:"data,omitempty"` // Count is the number of times to append the data. Count int `json:"count,omitempty"` }
func (in *FileAppendSpec) DeepCopy() *FileAppendSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileAppendSpec.
func (in *FileAppendSpec) DeepCopyInto(out *FileAppendSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileCreateSpec struct { // FileName is the name of the file to be created, modified, deleted, renamed, or appended. FileName string `json:"file-name,omitempty"` // DirName is the directory name to create or delete. DirName string `json:"dir-name,omitempty"` }
func (in *FileCreateSpec) DeepCopy() *FileCreateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileCreateSpec.
func (in *FileCreateSpec) DeepCopyInto(out *FileCreateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileDeleteSpec struct { // FileName is the name of the file to be created, modified, deleted, renamed, or appended. FileName string `json:"file-name,omitempty"` // DirName is the directory name to create or delete. DirName string `json:"dir-name,omitempty"` }
func (in *FileDeleteSpec) DeepCopy() *FileDeleteSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileDeleteSpec.
func (in *FileDeleteSpec) DeepCopyInto(out *FileDeleteSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileModifyPrivilegeSpec struct { // FileName is the name of the file to be created, modified, deleted, renamed, or appended. FileName string `json:"file-name,omitempty"` // Privilege is the file privilege to be set. Privilege uint32 `json:"privilege,omitempty"` }
func (in *FileModifyPrivilegeSpec) DeepCopy() *FileModifyPrivilegeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileModifyPrivilegeSpec.
func (in *FileModifyPrivilegeSpec) DeepCopyInto(out *FileModifyPrivilegeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileRenameSpec struct { // SourceFile is the name need to be renamed. SourceFile string `json:"source-file,omitempty"` // DestFile is the name to be renamed. DestFile string `json:"dest-file,omitempty"` }
func (in *FileRenameSpec) DeepCopy() *FileRenameSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileRenameSpec.
func (in *FileRenameSpec) DeepCopyInto(out *FileRenameSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileReplaceSpec struct { // FileName is the name of the file to be created, modified, deleted, renamed, or appended. FileName string `json:"file-name,omitempty"` // OriginStr is the origin string of the file. OriginStr string `json:"origin-string,omitempty"` // DestStr is the destination string of the file. DestStr string `json:"dest-string,omitempty"` // Line is the line number of the file to be replaced. Line int `json:"line,omitempty"` }
func (in *FileReplaceSpec) DeepCopy() *FileReplaceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileReplaceSpec.
func (in *FileReplaceSpec) DeepCopyInto(out *FileReplaceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
FileType represents type of file
type FileType string
const ( NamedPipe FileType = "namedPipe" CharDevice FileType = "charDevice" BlockDevice FileType = "blockDevice" Directory FileType = "directory" RegularFile FileType = "regularFile" TSymlink FileType = "symlink" Socket FileType = "socket" )
FillingType represents type of data is filled for incorrectness
type FillingType string
const ( // All zero Zero FillingType = "zero" // Random octets Random FillingType = "random" )
Filter represents a filter of IOChaos action, which will define the scope of an IOChaosAction
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"` }
func (in *Filter) DeepCopy() *Filter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter.
func (in *Filter) DeepCopyInto(out *Filter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FloatStr string
func (f *FloatStr) Default(root interface{}, field *reflect.StructField)
func (f *FloatStr) Validate(root interface{}, path *field.Path) field.ErrorList
Frame defines the function signature and predicate in function's body
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"` }
func (in *Frame) DeepCopy() *Frame
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Frame.
func (in *Frame) DeepCopyInto(out *Frame)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
GCPChaos is the Schema for the gcpchaos API
type GCPChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GCPChaosSpec `json:"spec"` Status GCPChaosStatus `json:"status,omitempty"` }
func (in *GCPChaos) DeepCopy() *GCPChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPChaos.
func (in *GCPChaos) DeepCopyInto(out *GCPChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GCPChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *GCPChaos) Default()
func (in *GCPChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (obj *GCPChaos) GetCustomStatus() interface{}
func (in *GCPChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *GCPChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *GCPChaos) GetSelectorSpecs() map[string]interface{}
func (in *GCPChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *GCPChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *GCPChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *GCPChaos) IsOneShot() bool
func (in *GCPChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *GCPChaos) Validate() ([]string, error)
func (in *GCPChaos) ValidateCreate() (admission.Warnings, error)
func (in *GCPChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *GCPChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
GCPChaosAction represents the chaos action about gcp.
type GCPChaosAction string
const ( // NodeStop represents the chaos action of stopping the node. NodeStop GCPChaosAction = "node-stop" // NodeReset represents the chaos action of resetting the node. NodeReset GCPChaosAction = "node-reset" // DiskLoss represents the chaos action of detaching the disk. DiskLoss GCPChaosAction = "disk-loss" )
func (in GCPChaosAction) Validate(root interface{}, path *field.Path) field.ErrorList
validateDeviceName validates the gcp chaos actions
GCPChaosList contains a list of GCPChaos
type GCPChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []GCPChaos `json:"items"` }
func (in *GCPChaosList) DeepCopy() *GCPChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPChaosList.
func (in *GCPChaosList) DeepCopyInto(out *GCPChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GCPChaosList) DeepCopyList() GenericChaosList
func (in *GCPChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *GCPChaosList) GetItems() []GenericChaos
func (in *GCPChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
GCPChaosSpec is the content of the specification for a GCPChaos
type GCPChaosSpec struct { // Action defines the specific gcp chaos action. // Supported action: node-stop / node-reset / disk-loss // Default action: node-stop // +kubebuilder:validation:Enum=node-stop;node-reset;disk-loss Action GCPChaosAction `json:"action"` // Duration represents the duration of the chaos action. // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // SecretName defines the name of kubernetes secret. It is used for GCP credentials. // +optional SecretName *string `json:"secretName,omitempty"` GCPSelector `json:",inline"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *GCPChaosSpec) DeepCopy() *GCPChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPChaosSpec.
func (in *GCPChaosSpec) DeepCopyInto(out *GCPChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GCPChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
GCPChaosStatus represents the status of a GCPChaos
type GCPChaosStatus struct { ChaosStatus `json:",inline"` // The attached disk info strings. // Needed in disk-loss. AttachedDisksStrings []string `json:"attachedDiskStrings,omitempty"` }
func (in *GCPChaosStatus) DeepCopy() *GCPChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPChaosStatus.
func (in *GCPChaosStatus) DeepCopyInto(out *GCPChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GCPDeviceNames []string
func (in GCPDeviceNames) DeepCopy() GCPDeviceNames
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPDeviceNames.
func (in GCPDeviceNames) DeepCopyInto(out *GCPDeviceNames)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GCPDeviceNames) Validate(root interface{}, path *field.Path) field.ErrorList
validateDeviceName validates the DeviceName
type GCPSelector struct { // Project defines the ID of gcp project. Project string `json:"project"` // Zone defines the zone of gcp project. Zone string `json:"zone"` // Instance defines the name of the instance Instance string `json:"instance"` // The device name of disks to detach. // Needed in disk-loss. // +ui:form:when=action=='disk-loss' // +optional DeviceNames []string `json:"deviceNames,omitempty" webhook:"GCPDeviceNames,nilable"` }
func (in *GCPSelector) DeepCopy() *GCPSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPSelector.
func (in *GCPSelector) DeepCopyInto(out *GCPSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (selector *GCPSelector) Id() string
GenericChaos could be a place holder for any kubernetes Kind +kubebuilder:object:generate=false
type GenericChaos interface { runtime.Object metav1.Object }
GenericChaosList only use to list GenericChaos by certain EmbedChaos +kubebuilder:object:generate=false
type GenericChaosList interface { runtime.Object metav1.ListInterface GetItems() []GenericChaos DeepCopyList() GenericChaosList }
GenericSelectorSpec defines some selectors to select objects.
type GenericSelectorSpec struct { // Namespaces is a set of namespace to which objects belong. // +optional Namespaces []string `json:"namespaces,omitempty"` // Map of string keys and values that can be used to select objects. // A selector based on fields. // +optional FieldSelectors map[string]string `json:"fieldSelectors,omitempty"` // Map of string keys and values that can be used to select objects. // A selector based on labels. // +optional LabelSelectors map[string]string `json:"labelSelectors,omitempty"` // a slice of label selector expressions that can be used to select objects. // A list of selectors based on set-based label expressions. // +optional ExpressionSelectors LabelSelectorRequirements `json:"expressionSelectors,omitempty" swaggerignore:"true"` // Map of string keys and values that can be used to select objects. // A selector based on annotations. // +optional AnnotationSelectors map[string]string `json:"annotationSelectors,omitempty"` }
func (in *GenericSelectorSpec) DeepCopy() *GenericSelectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericSelectorSpec.
func (in *GenericSelectorSpec) DeepCopyInto(out *GenericSelectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPAbortSpec struct { HTTPCommonSpec `json:",inline"` }
func (in *HTTPAbortSpec) DeepCopy() *HTTPAbortSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPAbortSpec.
func (in *HTTPAbortSpec) DeepCopyInto(out *HTTPAbortSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
HTTPChaos is the Schema for the HTTPchaos API
type HTTPChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec HTTPChaosSpec `json:"spec,omitempty"` Status HTTPChaosStatus `json:"status,omitempty"` }
func (in *HTTPChaos) DeepCopy() *HTTPChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaos.
func (in *HTTPChaos) DeepCopyInto(out *HTTPChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HTTPChaos) Default()
func (in *HTTPChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (obj *HTTPChaos) GetCustomStatus() interface{}
func (in *HTTPChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *HTTPChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *HTTPChaos) GetSelectorSpecs() map[string]interface{}
func (in *HTTPChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *HTTPChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *HTTPChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *HTTPChaos) IsOneShot() bool
func (in *HTTPChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *HTTPChaos) Validate() ([]string, error)
func (in *HTTPChaos) ValidateCreate() (admission.Warnings, error)
func (in *HTTPChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *HTTPChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
HTTPChaosList contains a list of HTTPChaos
type HTTPChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []HTTPChaos `json:"items"` }
func (in *HTTPChaosList) DeepCopy() *HTTPChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaosList.
func (in *HTTPChaosList) DeepCopyInto(out *HTTPChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPChaosList) DeepCopyList() GenericChaosList
func (in *HTTPChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *HTTPChaosList) GetItems() []GenericChaos
func (in *HTTPChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
type HTTPChaosSpec struct { PodSelector `json:",inline"` // Target is the object to be selected and injected. // +kubebuilder:validation:Enum=Request;Response Target PodHttpChaosTarget `json:"target"` PodHttpChaosActions `json:",inline"` // Port represents the target port to be proxy of. Port int32 `json:"port,omitempty" webhook:"Port"` // Path is a rule to select target by uri path in http request. // +optional Path *string `json:"path,omitempty"` // Method is a rule to select target by http method in request. // +optional Method *string `json:"method,omitempty" webhook:"HTTPMethod"` // Code is a rule to select target by http status code in response. // +optional Code *int32 `json:"code,omitempty"` // RequestHeaders is a rule to select target by http headers in request. // The key-value pairs represent header name and header value pairs. // +optional RequestHeaders map[string]string `json:"request_headers,omitempty"` // ResponseHeaders is a rule to select target by http headers in response. // The key-value pairs represent header name and header value pairs. // +optional ResponseHeaders map[string]string `json:"response_headers,omitempty"` // TLS is the tls config, // will override PodHttpChaos if there are multiple HTTPChaos experiments are applied // +optional TLS *PodHttpChaosTLS `json:"tls,omitempty"` // Duration represents the duration of the chaos action. // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *HTTPChaosSpec) DeepCopy() *HTTPChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaosSpec.
func (in *HTTPChaosSpec) DeepCopyInto(out *HTTPChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
type HTTPChaosStatus struct { ChaosStatus `json:",inline"` // Instances always specifies podhttpchaos generation or empty // +optional Instances map[string]int64 `json:"instances,omitempty"` }
func (in *HTTPChaosStatus) DeepCopy() *HTTPChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPChaosStatus.
func (in *HTTPChaosStatus) DeepCopyInto(out *HTTPChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPCommonSpec struct { // Composed with one of the port of HTTP connection, we will only attack HTTP connection with port inside proxy_ports ProxyPorts []uint `json:"proxy_ports"` // HTTP target: Request or Response Target string `json:"target"` // The TCP port that the target service listens on Port int32 `json:"port,omitempty"` // Match path of Uri with wildcard matches Path string `json:"path,omitempty"` // HTTP method Method string `json:"method,omitempty"` // Code is a rule to select target by http status code in response Code string `json:"code,omitempty"` }
func (in *HTTPCommonSpec) DeepCopy() *HTTPCommonSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPCommonSpec.
func (in *HTTPCommonSpec) DeepCopyInto(out *HTTPCommonSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPConfigSpec struct { // The config file path FilePath string `json:"file_path,omitempty"` }
func (in *HTTPConfigSpec) DeepCopy() *HTTPConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPConfigSpec.
func (in *HTTPConfigSpec) DeepCopyInto(out *HTTPConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPCriteria struct { // StatusCode defines the expected http status code for the request. // A statusCode string could be a single code (e.g. 200), or // an inclusive range (e.g. 200-400, both `200` and `400` are included). StatusCode string `json:"statusCode" webhook:"StatusCode"` }
func (in *HTTPCriteria) DeepCopy() *HTTPCriteria
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPCriteria.
func (in *HTTPCriteria) DeepCopyInto(out *HTTPCriteria)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPDelaySpec struct { HTTPCommonSpec `json:",inline"` // Delay represents the delay of the target request/response Delay string `json:"delay"` }
func (in *HTTPDelaySpec) DeepCopy() *HTTPDelaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPDelaySpec.
func (in *HTTPDelaySpec) DeepCopyInto(out *HTTPDelaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPMethod string
func (in *HTTPMethod) Validate(root interface{}, path *field.Path) field.ErrorList
type HTTPRequestMethod string
used for HTTP request, now only support GET
type HTTPRequestSpec struct { // Request to send" URL string `json:"url,omitempty"` // Enable connection pool EnableConnPool bool `json:"enable-conn-pool,omitempty"` // The number of requests to send Count int `json:"count,omitempty"` }
func (in *HTTPRequestSpec) DeepCopy() *HTTPRequestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPRequestSpec.
func (in *HTTPRequestSpec) DeepCopyInto(out *HTTPRequestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPStatusCheck struct { RequestUrl string `json:"url"` // +optional // +kubebuilder:validation:Enum=GET;POST // +kubebuilder:default=GET RequestMethod HTTPRequestMethod `json:"method,omitempty"` // +optional RequestHeaders http.Header `json:"headers,omitempty"` // +optional RequestBody string `json:"body,omitempty"` // Criteria defines how to determine the result of the status check. Criteria HTTPCriteria `json:"criteria"` }
func (in *HTTPStatusCheck) DeepCopy() *HTTPStatusCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPStatusCheck.
func (in *HTTPStatusCheck) DeepCopyInto(out *HTTPStatusCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HTTPStatusCheck) Validate(root interface{}, path *field.Path) field.ErrorList
IOChaos is the Schema for the iochaos API
type IOChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec IOChaosSpec `json:"spec,omitempty"` Status IOChaosStatus `json:"status,omitempty"` }
func (in *IOChaos) DeepCopy() *IOChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaos.
func (in *IOChaos) DeepCopyInto(out *IOChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IOChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *IOChaos) Default()
func (in *IOChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (obj *IOChaos) GetCustomStatus() interface{}
func (in *IOChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *IOChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *IOChaos) GetSelectorSpecs() map[string]interface{}
func (in *IOChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *IOChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *IOChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *IOChaos) IsOneShot() bool
func (in *IOChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *IOChaos) Validate() ([]string, error)
func (in *IOChaos) ValidateCreate() (admission.Warnings, error)
func (in *IOChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *IOChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
IOChaosAction defines a possible action of IOChaos
type IOChaosAction struct { Type IOChaosType `json:"type"` Filter `json:",inline"` // Faults represents the fault to inject // +optional Faults []IoFault `json:"faults,omitempty"` // Latency represents the latency to inject // +optional Latency string `json:"latency,omitempty"` // AttrOverride represents the attribution to override // +optional *AttrOverrideSpec `json:",inline"` // MistakeSpec represents the mistake to inject // +optional *MistakeSpec `json:"mistake,omitempty"` // Source represents the source of current rules Source string `json:"source,omitempty"` }
func (in *IOChaosAction) DeepCopy() *IOChaosAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaosAction.
func (in *IOChaosAction) DeepCopyInto(out *IOChaosAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
IOChaosList contains a list of IOChaos
type IOChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []IOChaos `json:"items"` }
func (in *IOChaosList) DeepCopy() *IOChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaosList.
func (in *IOChaosList) DeepCopyInto(out *IOChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IOChaosList) DeepCopyList() GenericChaosList
func (in *IOChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *IOChaosList) GetItems() []GenericChaos
func (in *IOChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
IOChaosSpec defines the desired state of IOChaos
type IOChaosSpec struct { ContainerSelector `json:",inline"` // Action defines the specific pod chaos action. // Supported action: latency / fault / attrOverride / mistake // +kubebuilder:validation:Enum=latency;fault;attrOverride;mistake Action IOChaosType `json:"action"` // Delay defines the value of I/O chaos action delay. // A delay string is a possibly signed sequence of // decimal numbers, each with optional fraction and a unit suffix, // such as "300ms". // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". // +ui:form:when=action=='latency' // +optional Delay string `json:"delay,omitempty" webhook:"Duration"` // Errno defines the error code that returned by I/O action. // refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html // +ui:form:when=action=='fault' // +optional Errno uint32 `json:"errno,omitempty" webhook:"IOErrno"` // Attr defines the overrided attribution // +ui:form:when=action=='attrOverride' // +optional Attr *AttrOverrideSpec `json:"attr,omitempty"` // Mistake defines what types of incorrectness are injected to IO operations // +ui:form:when=action=='mistake' // +optional Mistake *MistakeSpec `json:"mistake,omitempty"` // Path defines the path of files for injecting I/O chaos action. // +optional Path string `json:"path,omitempty"` // Methods defines the I/O methods for injecting I/O chaos action. // default: all I/O methods. // +optional Methods []IoMethod `json:"methods,omitempty" faker:"ioMethods"` // Percent defines the percentage of injection errors and provides a number from 0-100. // default: 100. // +optional // +kubebuilder:default=100 Percent int `json:"percent,omitempty" webhook:"Percent"` // VolumePath represents the mount path of injected volume VolumePath string `json:"volumePath"` // Duration represents the duration of the chaos action. // It is required when the action is `PodFailureAction`. // A duration string is a possibly signed sequence of // decimal numbers, each with optional fraction and a unit suffix, // such as "300ms", "-1.5h" or "2h45m". // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *IOChaosSpec) DeepCopy() *IOChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaosSpec.
func (in *IOChaosSpec) DeepCopyInto(out *IOChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IOChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
IOChaosStatus defines the observed state of IOChaos
type IOChaosStatus struct { ChaosStatus `json:",inline"` // Instances always specifies podiochaos generation or empty // +optional Instances map[string]int64 `json:"instances,omitempty"` }
func (in *IOChaosStatus) DeepCopy() *IOChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IOChaosStatus.
func (in *IOChaosStatus) DeepCopyInto(out *IOChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
IOChaosType represents the type of IOChaos Action
type IOChaosType string
const ( // IoLatency represents injecting latency for io operation IoLatency IOChaosType = "latency" // IoFaults represents injecting faults for io operation IoFaults IOChaosType = "fault" // IoAttrOverride represents replacing attribution for io operation IoAttrOverride IOChaosType = "attrOverride" // IoMistake represents injecting incorrect read or write for io operation IoMistake IOChaosType = "mistake" )
type IOErrno uint32
func (in *IOErrno) Validate(root interface{}, path *field.Path) field.ErrorList
IPSetType represents the type of IP set
type IPSetType string
const ( SetIPSet IPSetType = "list:set" NetPortIPSet IPSetType = "hash:net,port" NetIPSet IPSetType = "hash:net" )
InnerObject is basic Object for the Reconciler
type InnerObject interface { StatefulObject IsDeleted() bool IsPaused() bool DurationExceeded(time.Time) (bool, time.Duration, error) IsOneShot() bool }
+kubebuilder:object:generate=false
type InnerObjectWithCustomStatus interface { InnerObject GetCustomStatus() interface{} }
+kubebuilder:object:generate=false
type InnerObjectWithSelector interface { InnerObject GetSelectorSpecs() map[string]interface{} }
IoFault represents the fault to inject and their weight
type IoFault struct { Errno uint32 `json:"errno"` Weight int32 `json:"weight"` }
func (in *IoFault) DeepCopy() *IoFault
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IoFault.
func (in *IoFault) DeepCopyInto(out *IoFault)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IoMethod 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" )
JVMChaos is the Schema for the jvmchaos API
type JVMChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec JVMChaosSpec `json:"spec,omitempty"` Status JVMChaosStatus `json:"status,omitempty"` }
func (in *JVMChaos) DeepCopy() *JVMChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaos.
func (in *JVMChaos) DeepCopyInto(out *JVMChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JVMChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *JVMChaos) Default()
func (in *JVMChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (in *JVMChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *JVMChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *JVMChaos) GetSelectorSpecs() map[string]interface{}
func (in *JVMChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *JVMChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *JVMChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *JVMChaos) IsOneShot() bool
func (in *JVMChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *JVMChaos) Validate() ([]string, error)
func (in *JVMChaos) ValidateCreate() (admission.Warnings, error)
func (in *JVMChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *JVMChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
JVMChaosAction represents the chaos action about jvm
type JVMChaosAction string
const ( // JVMLatencyAction represents the JVM chaos action of invoke latency JVMLatencyAction JVMChaosAction = "latency" // JVMReturnAction represents the JVM chaos action of return value JVMReturnAction JVMChaosAction = "return" // JVMExceptionAction represents the JVM chaos action of throwing custom exceptions JVMExceptionAction JVMChaosAction = "exception" // JVMStressAction represents the JVM chaos action of stress like CPU and memory JVMStressAction JVMChaosAction = "stress" // JVMGCAction represents the JVM chaos action of trigger garbage collection JVMGCAction JVMChaosAction = "gc" // JVMRuleDataAction represents inject fault with byteman's rule // refer to https://downloads.jboss.org/byteman/4.0.14/byteman-programmers-guide.html#the-byteman-rule-language JVMRuleDataAction JVMChaosAction = "ruleData" // JVMMySQLAction represents the JVM chaos action of mysql java client fault injection JVMMySQLAction JVMChaosAction = "mysql" )
JVMChaosList contains a list of JVMChaos
type JVMChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []JVMChaos `json:"items"` }
func (in *JVMChaosList) DeepCopy() *JVMChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaosList.
func (in *JVMChaosList) DeepCopyInto(out *JVMChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JVMChaosList) DeepCopyList() GenericChaosList
func (in *JVMChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *JVMChaosList) GetItems() []GenericChaos
func (in *JVMChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
JVMChaosSpec defines the desired state of JVMChaos
type JVMChaosSpec struct { ContainerSelector `json:",inline"` // Duration represents the duration of the chaos action // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // Action defines the specific jvm chaos action. // Supported action: latency;return;exception;stress;gc;ruleData // +kubebuilder:validation:Enum=latency;return;exception;stress;gc;ruleData;mysql Action JVMChaosAction `json:"action"` // JVMParameter represents the detail about jvm chaos action definition // +optional JVMParameter `json:",inline"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *JVMChaosSpec) DeepCopy() *JVMChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaosSpec.
func (in *JVMChaosSpec) DeepCopyInto(out *JVMChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JVMChaosSpec) Default(root interface{}, field *reflect.StructField)
func (in *JVMChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
func (in *JVMChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList
JVMChaosStatus defines the observed state of JVMChaos
type JVMChaosStatus struct { ChaosStatus `json:",inline"` }
func (in *JVMChaosStatus) DeepCopy() *JVMChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMChaosStatus.
func (in *JVMChaosStatus) DeepCopyInto(out *JVMChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
JVMClassMethodSpec is the specification for class and method
type JVMClassMethodSpec struct { // +optional // Java class Class string `json:"class,omitempty"` // +optional // the method in Java class Method string `json:"method,omitempty"` }
func (in *JVMClassMethodSpec) DeepCopy() *JVMClassMethodSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMClassMethodSpec.
func (in *JVMClassMethodSpec) DeepCopyInto(out *JVMClassMethodSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
JVMCommonSpec is the common specification for JVMChaos
type JVMCommonSpec struct { // +optional // the port of agent server, default 9277 Port int32 `json:"port,omitempty"` // the pid of Java process which needs to attach Pid int `json:"pid,omitempty"` }
func (in *JVMCommonSpec) DeepCopy() *JVMCommonSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMCommonSpec.
func (in *JVMCommonSpec) DeepCopyInto(out *JVMCommonSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMExceptionSpec struct { JVMCommonSpec `json:",inline"` JVMClassMethodSpec `json:",inline"` // the exception which needs to throw for action `exception` ThrowException string `json:"exception,omitempty"` }
func (in *JVMExceptionSpec) DeepCopy() *JVMExceptionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMExceptionSpec.
func (in *JVMExceptionSpec) DeepCopyInto(out *JVMExceptionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMGCSpec struct { JVMCommonSpec `json:",inline"` }
func (in *JVMGCSpec) DeepCopy() *JVMGCSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMGCSpec.
func (in *JVMGCSpec) DeepCopyInto(out *JVMGCSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMLatencySpec struct { JVMCommonSpec `json:",inline"` JVMClassMethodSpec `json:",inline"` // the latency duration for action 'latency', unit ms LatencyDuration int `json:"latency,omitempty"` }
func (in *JVMLatencySpec) DeepCopy() *JVMLatencySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMLatencySpec.
func (in *JVMLatencySpec) DeepCopyInto(out *JVMLatencySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
JVMMySQLSpec is the specification of MySQL fault injection in JVM only when SQL match the Database, Table and SQLType, JVMChaos mesh will inject fault for examle:
SQL is "select * from test.t1", only when ((Database == "test" || Database == "") && (Table == "t1" || Table == "") && (SQLType == "select" || SQLType == "")) is true, JVMChaos will inject fault
type JVMMySQLSpec struct { // the version of mysql-connector-java, only support 5.X.X(set to "5") and 8.X.X(set to "8") now MySQLConnectorVersion string `json:"mysqlConnectorVersion,omitempty"` // the match database // default value is "", means match all database Database string `json:"database,omitempty"` // the match table // default value is "", means match all table Table string `json:"table,omitempty"` // the match sql type // default value is "", means match all SQL type. // The value can be 'select', 'insert', 'update', 'delete', 'replace'. SQLType string `json:"sqlType,omitempty"` }
func (in *JVMMySQLSpec) DeepCopy() *JVMMySQLSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMMySQLSpec.
func (in *JVMMySQLSpec) DeepCopyInto(out *JVMMySQLSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
JVMParameter represents the detail about jvm chaos action definition
type JVMParameter struct { JVMCommonSpec `json:",inline"` JVMClassMethodSpec `json:",inline"` JVMStressCfgSpec `json:",inline"` JVMMySQLSpec `json:",inline"` // +optional // byteman rule name, should be unique, and will generate one if not set Name string `json:"name"` // +optional // the return value for action 'return' ReturnValue string `json:"returnValue"` // +optional // the exception which needs to throw for action `exception` // or the exception message needs to throw in action `mysql` ThrowException string `json:"exception"` // +optional // the latency duration for action 'latency', unit ms // or the latency duration in action `mysql` LatencyDuration int `json:"latency"` // +optional // the byteman rule's data for action 'ruleData' RuleData string `json:"ruleData"` }
func (in *JVMParameter) DeepCopy() *JVMParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMParameter.
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 struct { JVMCommonSpec `json:",inline"` JVMClassMethodSpec `json:",inline"` // the return value for action 'return' ReturnValue string `json:"value,omitempty"` }
func (in *JVMReturnSpec) DeepCopy() *JVMReturnSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMReturnSpec.
func (in *JVMReturnSpec) DeepCopyInto(out *JVMReturnSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMRuleDataSpec struct { JVMCommonSpec `json:",inline"` // RuleData used to save the rule file's data, will use it when recover RuleData string `json:"rule-data,omitempty"` }
func (in *JVMRuleDataSpec) DeepCopy() *JVMRuleDataSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMRuleDataSpec.
func (in *JVMRuleDataSpec) DeepCopyInto(out *JVMRuleDataSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
JVMStressSpec is the specification for stress
type JVMStressCfgSpec struct { // +optional // the CPU core number needs to use, only set it when action is stress CPUCount int `json:"cpuCount,omitempty"` // +optional // the memory type needs to locate, only set it when action is stress, the value can be 'stack' or 'heap' MemoryType string `json:"memType,omitempty"` }
func (in *JVMStressCfgSpec) DeepCopy() *JVMStressCfgSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMStressCfgSpec.
func (in *JVMStressCfgSpec) DeepCopyInto(out *JVMStressCfgSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JVMStressSpec struct { JVMCommonSpec `json:",inline"` // the CPU core number need to use, only set it when action is stress CPUCount int `json:"cpu-count,omitempty"` // the memory type need to locate, only set it when action is stress, the value can be 'stack' or 'heap' MemoryType string `json:"mem-type,omitempty"` }
func (in *JVMStressSpec) DeepCopy() *JVMStressSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMStressSpec.
func (in *JVMStressSpec) DeepCopyInto(out *JVMStressSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KafkaCommonSpec struct { // The topic to attack Topic string `json:"topic,omitempty"` // The host of kafka server Host string `json:"host,omitempty"` // The port of kafka server Port uint16 `json:"port,omitempty"` // The username of kafka client Username string `json:"username,omitempty"` // The password of kafka client Password string `json:"password,omitempty"` }
func (in *KafkaCommonSpec) DeepCopy() *KafkaCommonSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaCommonSpec.
func (in *KafkaCommonSpec) DeepCopyInto(out *KafkaCommonSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KafkaFillSpec struct { KafkaCommonSpec `json:",inline"` // The size of each message MessageSize uint `json:"messageSize,omitempty"` // The max bytes to fill MaxBytes uint64 `json:"maxBytes,omitempty"` // The command to reload kafka config ReloadCommand string `json:"reloadCommand,omitempty"` }
func (in *KafkaFillSpec) DeepCopy() *KafkaFillSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaFillSpec.
func (in *KafkaFillSpec) DeepCopyInto(out *KafkaFillSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KafkaFloodSpec struct { KafkaCommonSpec `json:",inline"` // The size of each message MessageSize uint `json:"messageSize,omitempty"` // The number of worker threads Threads uint `json:"threads,omitempty"` }
func (in *KafkaFloodSpec) DeepCopy() *KafkaFloodSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaFloodSpec.
func (in *KafkaFloodSpec) DeepCopyInto(out *KafkaFloodSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KafkaIOSpec struct { // The topic to attack Topic string `json:"topic,omitempty"` // The path of server config ConfigFile string `json:"configFile,omitempty"` // Make kafka cluster non-readable NonReadable bool `json:"nonReadable,omitempty"` // Make kafka cluster non-writable NonWritable bool `json:"nonWritable,omitempty"` }
func (in *KafkaIOSpec) DeepCopy() *KafkaIOSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KafkaIOSpec.
func (in *KafkaIOSpec) DeepCopyInto(out *KafkaIOSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
KernelChaos is the Schema for the kernelchaos API
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"` }
func (in *KernelChaos) DeepCopy() *KernelChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelChaos.
func (in *KernelChaos) DeepCopyInto(out *KernelChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KernelChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *KernelChaos) Default()
func (in *KernelChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (in *KernelChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *KernelChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *KernelChaos) GetSelectorSpecs() map[string]interface{}
func (in *KernelChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *KernelChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *KernelChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *KernelChaos) IsOneShot() bool
func (in *KernelChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *KernelChaos) Validate() ([]string, error)
func (in *KernelChaos) ValidateCreate() (admission.Warnings, error)
func (in *KernelChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *KernelChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
KernelChaosList contains a list of KernelChaos
type KernelChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []KernelChaos `json:"items"` }
func (in *KernelChaosList) DeepCopy() *KernelChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelChaosList.
func (in *KernelChaosList) DeepCopyInto(out *KernelChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KernelChaosList) DeepCopyList() GenericChaosList
func (in *KernelChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *KernelChaosList) GetItems() []GenericChaos
func (in *KernelChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
KernelChaosSpec defines the desired state of KernelChaos
type KernelChaosSpec struct { ContainerSelector `json:",inline"` // FailKernRequest defines the request of kernel injection FailKernRequest FailKernRequest `json:"failKernRequest"` // Duration represents the duration of the chaos action Duration *string `json:"duration,omitempty" webhook:"Duration"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *KernelChaosSpec) DeepCopy() *KernelChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelChaosSpec.
func (in *KernelChaosSpec) DeepCopyInto(out *KernelChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KernelChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
KernelChaosStatus defines the observed state of KernelChaos
type KernelChaosStatus struct { ChaosStatus `json:",inline"` }
func (in *KernelChaosStatus) DeepCopy() *KernelChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KernelChaosStatus.
func (in *KernelChaosStatus) DeepCopyInto(out *KernelChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LUN int
func (in *LUN) Validate(root interface{}, path *field.Path) field.ErrorList
LabelSelectorRequirements is list of LabelSelectorRequirement
type LabelSelectorRequirements []metav1.LabelSelectorRequirement
func (in LabelSelectorRequirements) DeepCopy() LabelSelectorRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirements.
func (in LabelSelectorRequirements) DeepCopyInto(out *LabelSelectorRequirements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
LossSpec defines detail of a loss action
type LossSpec struct { Loss string `json:"loss" webhook:"FloatStr"` // +optional Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"` }
func (in *LossSpec) DeepCopy() *LossSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LossSpec.
func (in *LossSpec) DeepCopyInto(out *LossSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
MemoryStressor defines how to stress memory out
type MemoryStressor struct { Stressor `json:",inline"` // Size specifies N bytes consumed per vm worker, default is the total available memory. // One can specify the size as % of total available memory or in units of B, KB/KiB, // MB/MiB, GB/GiB, TB/TiB. // +optional Size string `json:"size,omitempty" webhook:"Bytes"` // OOMScoreAdj sets the oom_score_adj of the stress process. See `man 5 proc` to know more // about this option. // +kubebuilder:validation:Minimum=-1000 // +kubebuilder:validation:Maximum=1000 // +kubebuilder:default=0 // +optional OOMScoreAdj int `json:"oomScoreAdj,omitempty"` // extend stress-ng options // +optional Options []string `json:"options,omitempty"` }
func (in *MemoryStressor) DeepCopy() *MemoryStressor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryStressor.
func (in *MemoryStressor) DeepCopyInto(out *MemoryStressor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
MistakeSpec represents one type of mistake
type MistakeSpec struct { // Filling determines what is filled in the mistake data. // +optional // +kubebuilder:validation:Enum=zero;random Filling FillingType `json:"filling,omitempty"` // There will be [1, MaxOccurrences] segments of wrong data. // +optional // +kubebuilder:validation:Minimum=1 MaxOccurrences int64 `json:"maxOccurrences,omitempty"` // Max length of each wrong data segment in bytes // +optional // +kubebuilder:validation:Minimum=1 MaxLength int64 `json:"maxLength,omitempty"` }
func (in *MistakeSpec) DeepCopy() *MistakeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MistakeSpec.
func (in *MistakeSpec) DeepCopyInto(out *MistakeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkBandwidthSpec struct { Rate string `json:"rate"` // +kubebuilder:validation:Minimum=1 Limit uint32 `json:"limit"` // +kubebuilder:validation:Minimum=1 Buffer uint32 `json:"buffer"` Peakrate *uint64 `json:"peakrate,omitempty"` Minburst *uint32 `json:"minburst,omitempty"` Device string `json:"device,omitempty"` IPAddress string `json:"ip-address,omitempty"` Hostname string `json:"hostname,omitempty"` }
func (in *NetworkBandwidthSpec) DeepCopy() *NetworkBandwidthSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkBandwidthSpec.
func (in *NetworkBandwidthSpec) DeepCopyInto(out *NetworkBandwidthSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkBandwidthSpec) Validate(root interface{}, path *field.Path) field.ErrorList
NetworkChaos is the Schema for the networkchaos API
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,omitempty"` }
func (in *NetworkChaos) DeepCopy() *NetworkChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkChaos.
func (in *NetworkChaos) DeepCopyInto(out *NetworkChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *NetworkChaos) Default()
func (in *NetworkChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (obj *NetworkChaos) GetCustomStatus() interface{}
func (in *NetworkChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *NetworkChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *NetworkChaos) GetSelectorSpecs() map[string]interface{}
func (in *NetworkChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *NetworkChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *NetworkChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *NetworkChaos) IsOneShot() bool
func (in *NetworkChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *NetworkChaos) Validate() ([]string, error)
func (in *NetworkChaos) ValidateCreate() (admission.Warnings, error)
func (in *NetworkChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *NetworkChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
NetworkChaosAction represents the chaos action about network.
type NetworkChaosAction string
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" )
NetworkChaosList contains a list of NetworkChaos
type NetworkChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NetworkChaos `json:"items"` }
func (in *NetworkChaosList) DeepCopy() *NetworkChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkChaosList.
func (in *NetworkChaosList) DeepCopyInto(out *NetworkChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkChaosList) DeepCopyList() GenericChaosList
func (in *NetworkChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *NetworkChaosList) GetItems() []GenericChaos
func (in *NetworkChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
NetworkChaosSpec defines the desired state of NetworkChaos
type NetworkChaosSpec struct { PodSelector `json:",inline"` // Action defines the specific network chaos action. // Supported action: partition, netem, delay, loss, duplicate, corrupt // Default action: delay // +kubebuilder:validation:Enum=netem;delay;loss;duplicate;corrupt;partition;bandwidth Action NetworkChaosAction `json:"action"` // Device represents the network device to be affected. // +optional Device string `json:"device,omitempty"` // Duration represents the duration of the chaos action Duration *string `json:"duration,omitempty" webhook:"Duration"` // TcParameter represents the traffic control definition TcParameter `json:",inline"` // Direction represents the direction, this applies on netem and network partition action // +optional // +kubebuilder:validation:Enum=to;from;both // +kubebuilder:default=to Direction Direction `json:"direction,omitempty"` // Target represents network target, this applies on netem and network partition action // +optional Target *PodSelector `json:"target,omitempty" webhook:",nilable"` // TargetDevice represents the network device to be affected in target scope. // +optional TargetDevice string `json:"targetDevice,omitempty"` // ExternalTargets represents network targets outside k8s // +optional ExternalTargets []string `json:"externalTargets,omitempty"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *NetworkChaosSpec) DeepCopy() *NetworkChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkChaosSpec.
func (in *NetworkChaosSpec) DeepCopyInto(out *NetworkChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkChaosSpec) Default(root interface{}, field *reflect.StructField)
func (in *NetworkChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
func (in *NetworkChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList
ValidateTargets validates externalTargets and Targets
NetworkChaosStatus defines the observed state of NetworkChaos
type NetworkChaosStatus struct { ChaosStatus `json:",inline"` // Instances always specifies podnetworkchaos generation or empty // +optional Instances map[string]int64 `json:"instances,omitempty"` }
func (in *NetworkChaosStatus) DeepCopy() *NetworkChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkChaosStatus.
func (in *NetworkChaosStatus) DeepCopyInto(out *NetworkChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkCommonSpec struct { // correlation is percentage (10 is 10%) Correlation string `json:"correlation,omitempty"` // the network interface to impact Device string `json:"device,omitempty"` // only impact egress traffic from these source ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010. // it can only be used in conjunction with -p tcp or -p udp SourcePort string `json:"source-port,omitempty"` // only impact egress traffic to these destination ports, use a ',' to separate or to indicate the range, such as 80, 8001:8010. // it can only be used in conjunction with -p tcp or -p udp EgressPort string `json:"egress-port,omitempty"` // only impact egress traffic to these IP addresses IPAddress string `json:"ip-address,omitempty"` // only impact traffic using this IP protocol, supported: tcp, udp, icmp, all IPProtocol string `json:"ip-protocol,omitempty"` // only impact traffic to these hostnames Hostname string `json:"hostname,omitempty"` }
func (in *NetworkCommonSpec) DeepCopy() *NetworkCommonSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCommonSpec.
func (in *NetworkCommonSpec) DeepCopyInto(out *NetworkCommonSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkCorruptSpec struct { NetworkCommonSpec `json:",inline"` // percentage of packets to corrupt (10 is 10%) Percent string `json:"percent,omitempty"` }
func (in *NetworkCorruptSpec) DeepCopy() *NetworkCorruptSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCorruptSpec.
func (in *NetworkCorruptSpec) DeepCopyInto(out *NetworkCorruptSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkDNSSpec struct { // update the DNS server in /etc/resolv.conf with this value DNSServer string `json:"dns-server,omitempty"` // map specified host to this IP address DNSIp string `json:"dns-ip,omitempty"` // map this host to specified IP DNSDomainName string `json:"dns-domain-name,omitempty"` }
func (in *NetworkDNSSpec) DeepCopy() *NetworkDNSSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDNSSpec.
func (in *NetworkDNSSpec) DeepCopyInto(out *NetworkDNSSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkDelaySpec struct { NetworkCommonSpec `json:",inline"` // jitter time, time units: ns, us (or µs), ms, s, m, h. Jitter string `json:"jitter,omitempty"` // delay egress time, time units: ns, us (or µs), ms, s, m, h. Latency string `json:"latency,omitempty"` // only the packet which match the tcp flag can be accepted, others will be dropped. // only set when the IPProtocol is tcp, used for partition. AcceptTCPFlags string `json:"accept-tcp-flags,omitempty"` }
func (in *NetworkDelaySpec) DeepCopy() *NetworkDelaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDelaySpec.
func (in *NetworkDelaySpec) DeepCopyInto(out *NetworkDelaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkDownSpec struct { // The network interface to impact Device string `json:"device,omitempty"` // NIC down time, time units: ns, us (or µs), ms, s, m, h. Duration string `json:"duration,omitempty"` }
func (in *NetworkDownSpec) DeepCopy() *NetworkDownSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDownSpec.
func (in *NetworkDownSpec) DeepCopyInto(out *NetworkDownSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkDuplicateSpec struct { NetworkCommonSpec `json:",inline"` // percentage of packets to duplicate (10 is 10%) Percent string `json:"percent,omitempty"` }
func (in *NetworkDuplicateSpec) DeepCopy() *NetworkDuplicateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDuplicateSpec.
func (in *NetworkDuplicateSpec) DeepCopyInto(out *NetworkDuplicateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkFloodSpec struct { // The speed of network traffic, allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second Rate string `json:"rate"` // Generate traffic to this IP address IPAddress string `json:"ip-address,omitempty"` // Generate traffic to this port on the IP address Port string `json:"port,omitempty"` // The number of iperf parallel client threads to run Parallel int32 `json:"parallel,omitempty"` // The number of seconds to run the iperf test Duration string `json:"duration"` }
func (in *NetworkFloodSpec) DeepCopy() *NetworkFloodSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkFloodSpec.
func (in *NetworkFloodSpec) DeepCopyInto(out *NetworkFloodSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkLossSpec struct { NetworkCommonSpec `json:",inline"` // percentage of packets to loss (10 is 10%) Percent string `json:"percent,omitempty"` }
func (in *NetworkLossSpec) DeepCopy() *NetworkLossSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkLossSpec.
func (in *NetworkLossSpec) DeepCopyInto(out *NetworkLossSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkPartitionSpec struct { // the network interface to impact Device string `json:"device,omitempty"` // only impact traffic to these hostnames Hostname string `json:"hostname,omitempty"` // only impact egress traffic to these IP addresses IPAddress string `json:"ip-address,omitempty"` // specifies the partition direction, values can be 'from', 'to'. // 'from' means packets coming from the 'IPAddress' or 'Hostname' and going to your server, // 'to' means packets originating from your server and going to the 'IPAddress' or 'Hostname'. Direction string `json:"direction,omitempty"` // only impact egress traffic to these IP addresses IPProtocol string `json:"ip-protocol,omitempty"` // only the packet which match the tcp flag can be accepted, others will be dropped. // only set when the IPProtocol is tcp, used for partition. AcceptTCPFlags string `json:"accept-tcp-flags,omitempty"` }
func (in *NetworkPartitionSpec) DeepCopy() *NetworkPartitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPartitionSpec.
func (in *NetworkPartitionSpec) DeepCopyInto(out *NetworkPartitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PMJVMMySQLSpec struct { JVMCommonSpec `json:",inline"` JVMMySQLSpec `json:",inline"` // The exception which needs to throw for action `exception` // or the exception message needs to throw in action `mysql` ThrowException string `json:"exception,omitempty"` // The latency duration for action 'latency' // or the latency duration in action `mysql` LatencyDuration int `json:"latency,omitempty"` }
func (in *PMJVMMySQLSpec) DeepCopy() *PMJVMMySQLSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PMJVMMySQLSpec.
func (in *PMJVMMySQLSpec) DeepCopyInto(out *PMJVMMySQLSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Percent int
func (p *Percent) Validate(root interface{}, path *field.Path) field.ErrorList
type Phase string
const ( // NotInjected means the target is not injected yet. The controller could call "Inject" on the target NotInjected Phase = "Not Injected" // Injected means the target is injected. It's safe to recover it. Injected Phase = "Injected" )
PhysicalMachine is the Schema for the physical machine API
type PhysicalMachine struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the behavior of a physical machine Spec PhysicalMachineSpec `json:"spec"` }
func (in *PhysicalMachine) DeepCopy() *PhysicalMachine
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachine.
func (in *PhysicalMachine) DeepCopyInto(out *PhysicalMachine)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PhysicalMachine) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PhysicalMachine) Default()
func (in *PhysicalMachine) Validate() ([]string, error)
func (in *PhysicalMachine) ValidateCreate() (admission.Warnings, error)
func (in *PhysicalMachine) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *PhysicalMachine) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
PhysicalMachineChaos is the Schema for the physical machine chaos API
type PhysicalMachineChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the behavior of a physical machine chaos experiment Spec PhysicalMachineChaosSpec `json:"spec"` // +optional // Most recently observed status of the chaos experiment Status PhysicalMachineChaosStatus `json:"status,omitempty"` }
func (in *PhysicalMachineChaos) DeepCopy() *PhysicalMachineChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineChaos.
func (in *PhysicalMachineChaos) DeepCopyInto(out *PhysicalMachineChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PhysicalMachineChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PhysicalMachineChaos) Default()
func (in *PhysicalMachineChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (in *PhysicalMachineChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *PhysicalMachineChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *PhysicalMachineChaos) GetSelectorSpecs() map[string]interface{}
func (in *PhysicalMachineChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *PhysicalMachineChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *PhysicalMachineChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *PhysicalMachineChaos) IsOneShot() bool
func (in *PhysicalMachineChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *PhysicalMachineChaos) Validate() ([]string, error)
func (in *PhysicalMachineChaos) ValidateCreate() (admission.Warnings, error)
func (in *PhysicalMachineChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *PhysicalMachineChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
PhysicalMachineChaosAction represents the chaos action about physical machine.
type PhysicalMachineChaosAction string
var ( PMStressCPUAction PhysicalMachineChaosAction = "stress-cpu" PMStressMemAction PhysicalMachineChaosAction = "stress-mem" PMDiskWritePayloadAction PhysicalMachineChaosAction = "disk-write-payload" PMDiskReadPayloadAction PhysicalMachineChaosAction = "disk-read-payload" PMDiskFillAction PhysicalMachineChaosAction = "disk-fill" PMNetworkCorruptAction PhysicalMachineChaosAction = "network-corrupt" PMNetworkDuplicateAction PhysicalMachineChaosAction = "network-duplicate" PMNetworkLossAction PhysicalMachineChaosAction = "network-loss" PMNetworkDelayAction PhysicalMachineChaosAction = "network-delay" PMNetworkPartitionAction PhysicalMachineChaosAction = "network-partition" PMNetworkBandwidthAction PhysicalMachineChaosAction = "network-bandwidth" PMNetworkDNSAction PhysicalMachineChaosAction = "network-dns" PMNetworkFloodAction PhysicalMachineChaosAction = "network-flood" PMNetworkDownAction PhysicalMachineChaosAction = "network-down" PMProcessAction PhysicalMachineChaosAction = "process" PMJVMExceptionAction PhysicalMachineChaosAction = "jvm-exception" PMJVMGCAction PhysicalMachineChaosAction = "jvm-gc" PMJVMLatencyAction PhysicalMachineChaosAction = "jvm-latency" PMJVMReturnAction PhysicalMachineChaosAction = "jvm-return" PMJVMStressAction PhysicalMachineChaosAction = "jvm-stress" PMJVMRuleDataAction PhysicalMachineChaosAction = "jvm-rule-data" PMJVMMySQLAction PhysicalMachineChaosAction = "jvm-mysql" PMClockAction PhysicalMachineChaosAction = "clock" PMRedisExpirationAction PhysicalMachineChaosAction = "redis-expiration" PMRedisPenetrationAction PhysicalMachineChaosAction = "redis-penetration" PMRedisCacheLimitAction PhysicalMachineChaosAction = "redis-cacheLimit" PMRedisSentinelRestartAction PhysicalMachineChaosAction = "redis-restart" PMRedisSentinelStopAction PhysicalMachineChaosAction = "redis-stop" PMKafkaFillAction PhysicalMachineChaosAction = "kafka-fill" PMKafkaFloodAction PhysicalMachineChaosAction = "kafka-flood" PMKafkaIOAction PhysicalMachineChaosAction = "kafka-io" PMHTTPAbortAction PhysicalMachineChaosAction = "http-abort" PMHTTPDelayAction PhysicalMachineChaosAction = "http-delay" PMHTTPConfigAction PhysicalMachineChaosAction = "http-config" PMHTTPRequestAction PhysicalMachineChaosAction = "http-request" PMFileCreateAction PhysicalMachineChaosAction = "file-create" PMFileModifyPrivilegeAction PhysicalMachineChaosAction = "file-modify" PMFileDeleteAction PhysicalMachineChaosAction = "file-delete" PMFileRenameAction PhysicalMachineChaosAction = "file-rename" PMFileAppendAction PhysicalMachineChaosAction = "file-append" PMFileReplaceAction PhysicalMachineChaosAction = "file-replace" PMVMAction PhysicalMachineChaosAction = "vm" PMUserDefinedAction PhysicalMachineChaosAction = "user_defined" )
PhysicalMachineChaosList contains a list of PhysicalMachineChaos
type PhysicalMachineChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PhysicalMachineChaos `json:"items"` }
func (in *PhysicalMachineChaosList) DeepCopy() *PhysicalMachineChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineChaosList.
func (in *PhysicalMachineChaosList) DeepCopyInto(out *PhysicalMachineChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PhysicalMachineChaosList) DeepCopyList() GenericChaosList
func (in *PhysicalMachineChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PhysicalMachineChaosList) GetItems() []GenericChaos
func (in *PhysicalMachineChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
PhysicalMachineChaosSpec defines the desired state of PhysicalMachineChaos
type PhysicalMachineChaosSpec struct { // +kubebuilder:validation:Enum=stress-cpu;stress-mem;disk-read-payload;disk-write-payload;disk-fill;network-corrupt;network-duplicate;network-loss;network-delay;network-partition;network-dns;network-bandwidth;network-flood;network-down;process;jvm-exception;jvm-gc;jvm-latency;jvm-return;jvm-stress;jvm-rule-data;jvm-mysql;clock;redis-expiration;redis-penetration;redis-cacheLimit;redis-restart;redis-stop;kafka-fill;kafka-flood;kafka-io;file-create;file-modify;file-delete;file-rename;file-append;file-replace;vm;user_defined Action PhysicalMachineChaosAction `json:"action"` PhysicalMachineSelector `json:",inline"` // ExpInfo string `json:"expInfo"` ExpInfo `json:",inline"` // Duration represents the duration of the chaos action // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *PhysicalMachineChaosSpec) DeepCopy() *PhysicalMachineChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineChaosSpec.
func (in *PhysicalMachineChaosSpec) DeepCopyInto(out *PhysicalMachineChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PhysicalMachineChaosSpec) Default(root interface{}, field *reflect.StructField)
func (in *PhysicalMachineChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
func (in *PhysicalMachineChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList
PhysicalMachineChaosStatus defines the observed state of PhysicalMachineChaos
type PhysicalMachineChaosStatus struct { ChaosStatus `json:",inline"` }
func (in *PhysicalMachineChaosStatus) DeepCopy() *PhysicalMachineChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineChaosStatus.
func (in *PhysicalMachineChaosStatus) DeepCopyInto(out *PhysicalMachineChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PhysicalMachineList contains a list of PhysicalMachine
type PhysicalMachineList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PhysicalMachine `json:"items"` }
func (in *PhysicalMachineList) DeepCopy() *PhysicalMachineList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineList.
func (in *PhysicalMachineList) DeepCopyInto(out *PhysicalMachineList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PhysicalMachineList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PhysicalMachineSelector struct { // DEPRECATED: Use Selector instead. // Only one of Address and Selector could be specified. // +optional Address []string `json:"address,omitempty"` // Selector is used to select physical machines that are used to inject chaos action. // +optional Selector PhysicalMachineSelectorSpec `json:"selector,omitempty"` // Mode defines the mode to run chaos action. // Supported mode: one / all / fixed / fixed-percent / random-max-percent // +kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent Mode SelectorMode `json:"mode"` // Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. // If `FixedMode`, provide an integer of physical machines to do chaos action. // If `FixedPercentMode`, provide a number from 0-100 to specify the percent of physical machines the server can do chaos action. // IF `RandomMaxPercentMode`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional Value string `json:"value,omitempty"` }
func (in *PhysicalMachineSelector) DeepCopy() *PhysicalMachineSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineSelector.
func (in *PhysicalMachineSelector) DeepCopyInto(out *PhysicalMachineSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PhysicalMachineSelectorSpec defines some selectors to select objects. If the all selectors are empty, all objects will be used in chaos experiment.
type PhysicalMachineSelectorSpec struct { GenericSelectorSpec `json:",inline"` // PhysicalMachines is a map of string keys and a set values that used to select physical machines. // The key defines the namespace which physical machine belong, // and each value is a set of physical machine names. // +optional PhysicalMachines map[string][]string `json:"physicalMachines,omitempty"` }
func (in *PhysicalMachineSelectorSpec) DeepCopy() *PhysicalMachineSelectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineSelectorSpec.
func (in *PhysicalMachineSelectorSpec) DeepCopyInto(out *PhysicalMachineSelectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (spec *PhysicalMachineSelectorSpec) Empty() bool
PhysicalMachineSpec defines the desired state of PhysicalMachine
type PhysicalMachineSpec struct { // Address represents the address of the physical machine Address string `json:"address"` }
func (in *PhysicalMachineSpec) DeepCopy() *PhysicalMachineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PhysicalMachineSpec.
func (in *PhysicalMachineSpec) DeepCopyInto(out *PhysicalMachineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PhysicalMachineSpec) Default(root interface{}, field *reflect.StructField)
func (in *PhysicalMachineSpec) Validate(root interface{}, path *field.Path) field.ErrorList
PodChaos is the control script`s spec.
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,omitempty"` }
func (in *PodChaos) DeepCopy() *PodChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodChaos.
func (in *PodChaos) DeepCopyInto(out *PodChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodChaos) Default()
func (in *PodChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (in *PodChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *PodChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *PodChaos) GetSelectorSpecs() map[string]interface{}
func (in *PodChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *PodChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *PodChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *PodChaos) IsOneShot() bool
func (in *PodChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *PodChaos) Validate() ([]string, error)
func (in *PodChaos) ValidateCreate() (admission.Warnings, error)
func (in *PodChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *PodChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
PodChaosAction represents the chaos action about pods.
type PodChaosAction string
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" )
PodChaosList contains a list of PodChaos
type PodChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PodChaos `json:"items"` }
func (in *PodChaosList) DeepCopy() *PodChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodChaosList.
func (in *PodChaosList) DeepCopyInto(out *PodChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodChaosList) DeepCopyList() GenericChaosList
func (in *PodChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodChaosList) GetItems() []GenericChaos
func (in *PodChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
PodChaosSpec defines the attributes that a user creates on a chaos experiment about pods.
type PodChaosSpec struct { ContainerSelector `json:",inline"` // Action defines the specific pod chaos action. // Supported action: pod-kill / pod-failure / container-kill // Default action: pod-kill // +kubebuilder:validation:Enum=pod-kill;pod-failure;container-kill Action PodChaosAction `json:"action"` // Duration represents the duration of the chaos action. // It is required when the action is `PodFailureAction`. // A duration string is a possibly signed sequence of // decimal numbers, each with optional fraction and a unit suffix, // such as "300ms", "-1.5h" or "2h45m". // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // GracePeriod is used in pod-kill action. It represents the duration in seconds before the pod should be deleted. // Value must be non-negative integer. The default value is zero that indicates delete immediately. // +optional // +kubebuilder:validation:Minimum=0 GracePeriod int64 `json:"gracePeriod,omitempty"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *PodChaosSpec) DeepCopy() *PodChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodChaosSpec.
func (in *PodChaosSpec) DeepCopyInto(out *PodChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
func (in *PodChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList
validateContainerNames validates the ContainerNames
PodChaosStatus represents the current status of the chaos experiment about pods.
type PodChaosStatus struct { ChaosStatus `json:",inline"` }
func (in *PodChaosStatus) DeepCopy() *PodChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodChaosStatus.
func (in *PodChaosStatus) DeepCopyInto(out *PodChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+chaos-mesh:base +chaos-mesh:webhook:enableUpdate +kubebuilder:subresource:status PodHttpChaos is the Schema for the podhttpchaos API
type PodHttpChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PodHttpChaosSpec `json:"spec,omitempty"` Status PodHttpChaosStatus `json:"status,omitempty"` }
func (in *PodHttpChaos) DeepCopy() *PodHttpChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaos.
func (in *PodHttpChaos) DeepCopyInto(out *PodHttpChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodHttpChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodHttpChaos) Default()
func (in *PodHttpChaos) Validate() ([]string, error)
func (in *PodHttpChaos) ValidateCreate() (admission.Warnings, error)
func (in *PodHttpChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *PodHttpChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
PodHttpChaosActions defines possible actions of HttpChaos.
type PodHttpChaosActions struct { // Abort is a rule to abort a http session. // +optional Abort *bool `json:"abort,omitempty"` // Delay represents the delay of the target request/response. // A duration string is a possibly unsigned sequence of // decimal numbers, each with optional fraction and a unit suffix, // such as "300ms", "2h45m". // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". // +optional Delay *string `json:"delay,omitempty" webhook:"Delay"` // Replace is a rule to replace some contents in target. // +optional Replace *PodHttpChaosReplaceActions `json:"replace,omitempty"` // Patch is a rule to patch some contents in target. // +optional Patch *PodHttpChaosPatchActions `json:"patch,omitempty"` }
func (in *PodHttpChaosActions) DeepCopy() *PodHttpChaosActions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosActions.
func (in *PodHttpChaosActions) DeepCopyInto(out *PodHttpChaosActions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodHttpChaosBaseRule defines the injection rule without source and port.
type PodHttpChaosBaseRule struct { // Target is the object to be selected and injected, <Request|Response>. Target PodHttpChaosTarget `json:"target"` // Selector contains the rules to select target. Selector PodHttpChaosSelector `json:"selector"` // Actions contains rules to inject target. Actions PodHttpChaosActions `json:"actions"` }
func (in *PodHttpChaosBaseRule) DeepCopy() *PodHttpChaosBaseRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosBaseRule.
func (in *PodHttpChaosBaseRule) DeepCopyInto(out *PodHttpChaosBaseRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodHttpChaosList contains a list of PodHttpChaos
type PodHttpChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PodHttpChaos `json:"items"` }
func (in *PodHttpChaosList) DeepCopy() *PodHttpChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosList.
func (in *PodHttpChaosList) DeepCopyInto(out *PodHttpChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodHttpChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
PodHttpChaosPatchActions defines possible patch-actions of HttpChaos.
type PodHttpChaosPatchActions struct { // Body is a rule to patch message body of target. // +optional Body *PodHttpChaosPatchBodyAction `json:"body,omitempty"` // Queries is a rule to append uri queries of target(Request only). // For example: `[["foo", "bar"], ["foo", "unknown"]]`. // +optional Queries [][]string `json:"queries,omitempty"` // Headers is a rule to append http headers of target. // For example: `[["Set-Cookie", "<one cookie>"], ["Set-Cookie", "<another cookie>"]]`. // +optional Headers [][]string `json:"headers,omitempty"` }
func (in *PodHttpChaosPatchActions) DeepCopy() *PodHttpChaosPatchActions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosPatchActions.
func (in *PodHttpChaosPatchActions) DeepCopyInto(out *PodHttpChaosPatchActions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodHttpChaosPatchBodyAction defines patch body action of HttpChaos.
type PodHttpChaosPatchBodyAction struct { // Type represents the patch type, only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) currently. Type string `json:"type"` // Value is the patch contents. Value string `json:"value"` }
func (in *PodHttpChaosPatchBodyAction) DeepCopy() *PodHttpChaosPatchBodyAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosPatchBodyAction.
func (in *PodHttpChaosPatchBodyAction) DeepCopyInto(out *PodHttpChaosPatchBodyAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodHttpChaosReplaceActions defines possible replace-actions of HttpChaos.
type PodHttpChaosReplaceActions struct { // Path is rule to to replace uri path in http request. // +optional Path *string `json:"path,omitempty"` // Method is a rule to replace http method in request. // +optional Method *string `json:"method,omitempty"` // Code is a rule to replace http status code in response. // +optional Code *int32 `json:"code,omitempty"` // Body is a rule to replace http message body in target. // +optional Body []byte `json:"body,omitempty"` // Queries is a rule to replace uri queries in http request. // For example, with value `{ "foo": "unknown" }`, the `/?foo=bar` will be altered to `/?foo=unknown`, // +optional Queries map[string]string `json:"queries,omitempty"` // Headers is a rule to replace http headers of target. // The key-value pairs represent header name and header value pairs. // +optional Headers map[string]string `json:"headers,omitempty"` }
func (in *PodHttpChaosReplaceActions) DeepCopy() *PodHttpChaosReplaceActions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosReplaceActions.
func (in *PodHttpChaosReplaceActions) DeepCopyInto(out *PodHttpChaosReplaceActions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodHttpChaosRule defines the injection rule for http.
type PodHttpChaosRule struct { PodHttpChaosBaseRule `json:",inline"` // Source represents the source of current rules Source string `json:"source,omitempty"` // Port represents the target port to be proxy of. Port int32 `json:"port"` }
func (in *PodHttpChaosRule) DeepCopy() *PodHttpChaosRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosRule.
func (in *PodHttpChaosRule) DeepCopyInto(out *PodHttpChaosRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodHttpChaosSelector struct { // Port is a rule to select server listening on specific port. // +optional Port *int32 `json:"port,omitempty"` // Path is a rule to select target by uri path in http request. // +optional Path *string `json:"path,omitempty"` // Method is a rule to select target by http method in request. // +optional Method *string `json:"method,omitempty"` // Code is a rule to select target by http status code in response. // +optional Code *int32 `json:"code,omitempty"` // RequestHeaders is a rule to select target by http headers in request. // The key-value pairs represent header name and header value pairs. // +optional RequestHeaders map[string]string `json:"request_headers,omitempty"` // ResponseHeaders is a rule to select target by http headers in response. // The key-value pairs represent header name and header value pairs. // +optional ResponseHeaders map[string]string `json:"response_headers,omitempty"` }
func (in *PodHttpChaosSelector) DeepCopy() *PodHttpChaosSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosSelector.
func (in *PodHttpChaosSelector) DeepCopyInto(out *PodHttpChaosSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodHttpChaosSpec defines the desired state of PodHttpChaos.
type PodHttpChaosSpec struct { // Rules are a list of injection rule for http request. // +optional Rules []PodHttpChaosRule `json:"rules,omitempty"` // TLS is the tls config, // will be override if there are multiple HTTPChaos experiments are applied // +optional TLS *PodHttpChaosTLS `json:"tls,omitempty"` }
func (in *PodHttpChaosSpec) DeepCopy() *PodHttpChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosSpec.
func (in *PodHttpChaosSpec) DeepCopyInto(out *PodHttpChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodHttpChaosStatus defines the actual state of PodHttpChaos.
type PodHttpChaosStatus struct { // Pid represents a running tproxy process id. // +optional Pid int64 `json:"pid,omitempty"` // StartTime represents the start time of a tproxy process. // +optional StartTime int64 `json:"startTime,omitempty"` // +optional FailedMessage string `json:"failedMessage,omitempty"` // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
func (in *PodHttpChaosStatus) DeepCopy() *PodHttpChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosStatus.
func (in *PodHttpChaosStatus) DeepCopyInto(out *PodHttpChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodHttpChaosTLS contains the tls config for HTTPChaos
type PodHttpChaosTLS struct { // SecretName represents the name of required secret resource SecretName string `json:"secretName"` // SecretNamespace represents the namespace of required secret resource SecretNamespace string `json:"secretNamespace"` // CertName represents the data name of cert file in secret, `tls.crt` for example CertName string `json:"certName"` // KeyName represents the data name of key file in secret, `tls.key` for example KeyName string `json:"keyName"` // CAName represents the data name of ca file in secret, `ca.crt` for example // +optional CAName *string `json:"caName,omitempty"` }
func (in *PodHttpChaosTLS) DeepCopy() *PodHttpChaosTLS
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodHttpChaosTLS.
func (in *PodHttpChaosTLS) DeepCopyInto(out *PodHttpChaosTLS)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodHttpChaosTarget represents the type of an HttpChaos Action
type PodHttpChaosTarget string
const ( // PodHttpRequest represents injecting chaos for http request PodHttpRequest PodHttpChaosTarget = "Request" // PodHttpResponse represents injecting chaos for http response PodHttpResponse PodHttpChaosTarget = "Response" )
func (in *PodHttpChaosTarget) Validate(root interface{}, path *field.Path) field.ErrorList
+chaos-mesh:base +chaos-mesh:webhook:enableUpdate +kubebuilder:object:root=true +kubebuilder:subresource:status PodIOChaos is the Schema for the podiochaos API
type PodIOChaos struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PodIOChaosSpec `json:"spec,omitempty"` //+optional Status PodIOChaosStatus `json:"status,omitempty"` }
func (in *PodIOChaos) DeepCopy() *PodIOChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIOChaos.
func (in *PodIOChaos) DeepCopyInto(out *PodIOChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodIOChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodIOChaos) Default()
func (in *PodIOChaos) Validate() ([]string, error)
func (in *PodIOChaos) ValidateCreate() (admission.Warnings, error)
func (in *PodIOChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *PodIOChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
PodIOChaosList contains a list of PodIOChaos
type PodIOChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PodIOChaos `json:"items"` }
func (in *PodIOChaosList) DeepCopy() *PodIOChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIOChaosList.
func (in *PodIOChaosList) DeepCopyInto(out *PodIOChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodIOChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
PodIOChaosSpec defines the desired state of IOChaos
type PodIOChaosSpec struct { // VolumeMountPath represents the target mount path // It must be a root of mount path now. // TODO: search the mount parent of any path automatically. // TODO: support multiple different volume mount path in one pod VolumeMountPath string `json:"volumeMountPath"` // TODO: support multiple different container to inject in one pod // +optional Container *string `json:"container,omitempty"` // Actions are a list of IOChaos actions // +optional Actions []IOChaosAction `json:"actions,omitempty"` }
func (in *PodIOChaosSpec) DeepCopy() *PodIOChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIOChaosSpec.
func (in *PodIOChaosSpec) DeepCopyInto(out *PodIOChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodIOChaosStatus struct { // Pid represents a running toda process id // +optional Pid int64 `json:"pid,omitempty"` // StartTime represents the start time of a toda process // +optional StartTime int64 `json:"startTime,omitempty"` // +optional FailedMessage string `json:"failedMessage,omitempty"` // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
func (in *PodIOChaosStatus) DeepCopy() *PodIOChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodIOChaosStatus.
func (in *PodIOChaosStatus) DeepCopyInto(out *PodIOChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodNetworkChaos is the Schema for the PodNetworkChaos API
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,omitempty"` }
func (in *PodNetworkChaos) DeepCopy() *PodNetworkChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkChaos.
func (in *PodNetworkChaos) DeepCopyInto(out *PodNetworkChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodNetworkChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodNetworkChaos) Default()
func (in *PodNetworkChaos) Validate() ([]string, error)
func (in *PodNetworkChaos) ValidateCreate() (admission.Warnings, error)
func (in *PodNetworkChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *PodNetworkChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
PodNetworkChaosList contains a list of PodNetworkChaos
type PodNetworkChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PodNetworkChaos `json:"items"` }
func (in *PodNetworkChaosList) DeepCopy() *PodNetworkChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkChaosList.
func (in *PodNetworkChaosList) DeepCopyInto(out *PodNetworkChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodNetworkChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
PodNetworkChaosSpec defines the desired state of PodNetworkChaos
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"` }
func (in *PodNetworkChaosSpec) DeepCopy() *PodNetworkChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkChaosSpec.
func (in *PodNetworkChaosSpec) DeepCopyInto(out *PodNetworkChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PodNetworkChaosStatus defines the observed state of PodNetworkChaos
type PodNetworkChaosStatus struct { FailedMessage string `json:"failedMessage,omitempty"` ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
func (in *PodNetworkChaosStatus) DeepCopy() *PodNetworkChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkChaosStatus.
func (in *PodNetworkChaosStatus) DeepCopyInto(out *PodNetworkChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodSelector struct { // Selector is used to select pods that are used to inject chaos action. Selector PodSelectorSpec `json:"selector"` // Mode defines the mode to run chaos action. // Supported mode: one / all / fixed / fixed-percent / random-max-percent // +kubebuilder:validation:Enum=one;all;fixed;fixed-percent;random-max-percent Mode SelectorMode `json:"mode"` // Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. // If `FixedMode`, provide an integer of pods to do chaos action. // If `FixedPercentMode`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. // IF `RandomMaxPercentMode`, provide a number from 0-100 to specify the max percent of pods to do chaos action // +optional Value string `json:"value,omitempty"` }
func (in *PodSelector) DeepCopy() *PodSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSelector.
func (in *PodSelector) DeepCopyInto(out *PodSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (p *PodSelector) Default(root interface{}, field *reflect.StructField)
func (p *PodSelector) Validate(root interface{}, path *field.Path) field.ErrorList
PodSelectorSpec defines the some selectors to select objects. If the all selectors are empty, all objects will be used in chaos experiment.
type PodSelectorSpec struct { GenericSelectorSpec `json:",inline"` // Nodes is a set of node name and objects must belong to these nodes. // +optional Nodes []string `json:"nodes,omitempty"` // Pods is a map of string keys and a set values that used to select pods. // The key defines the namespace which pods belong, // and the each values is a set of pod names. // +optional Pods map[string][]string `json:"pods,omitempty"` // Map of string keys and values that can be used to select nodes. // Selector which must match a node's labels, // and objects must belong to these selected nodes. // +optional NodeSelectors map[string]string `json:"nodeSelectors,omitempty"` // PodPhaseSelectors is a set of condition of a pod at the current time. // supported value: Pending / Running / Succeeded / Failed / Unknown // +optional PodPhaseSelectors []string `json:"podPhaseSelectors,omitempty"` }
func (in PodSelectorSpec) ClusterScoped() bool
ClusterScoped returns true if the selector selects Pods in the cluster
func (in *PodSelectorSpec) DeepCopy() *PodSelectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSelectorSpec.
func (in *PodSelectorSpec) DeepCopyInto(out *PodSelectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSelectorSpec) DefaultNamespace(namespace string)
type Port int32
func (in *Port) Validate(root interface{}, path *field.Path) field.ErrorList
type ProcessSpec struct { // the process name or the process ID Process string `json:"process,omitempty"` // the signal number to send Signal int `json:"signal,omitempty"` // the command to be run when recovering experiment RecoverCmd string `json:"recoverCmd,omitempty"` }
func (in *ProcessSpec) DeepCopy() *ProcessSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProcessSpec.
func (in *ProcessSpec) DeepCopyInto(out *ProcessSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Rate string
func (in *Rate) Validate(root interface{}, path *field.Path) field.ErrorList
validateBandwidth validates the bandwidth
RateSpec defines details of rate limit.
type RateSpec struct { // Rate is the speed knob. Allows bit, kbit, mbit, gbit, tbit, bps, kbps, mbps, gbps, tbps unit. bps means bytes per second. Rate string `json:"rate" webhook:"Rate"` }
func (in *RateSpec) DeepCopy() *RateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateSpec.
func (in *RateSpec) DeepCopyInto(out *RateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
RawIPSet represents an ipset on specific pod
type RawIPSet struct { // The name of ipset Name string `json:"name"` IPSetType IPSetType `json:"ipsetType"` // The contents of ipset. // Only available when IPSetType is NetIPSet. // +optional Cidrs []string `json:"cidrs,omitempty"` // The contents of ipset. // Only available when IPSetType is NetPortIPSet. // +optional CidrAndPorts []CidrAndPort `json:"cidrAndPorts,omitempty"` // The contents of ipset. // Only available when IPSetType is SetIPSet. // +optional SetNames []string `json:"setNames,omitempty"` // The name and namespace of the source network chaos RawRuleSource `json:",inline"` }
func (in *RawIPSet) DeepCopy() *RawIPSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawIPSet.
func (in *RawIPSet) DeepCopyInto(out *RawIPSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
RawIptables represents the iptables rules on specific pod
type RawIptables struct { // The name of iptables chain Name string `json:"name"` // The name of related ipset // +optional // +nullable IPSets []string `json:"ipsets,omitempty"` // The block direction of this iptables rule Direction ChainDirection `json:"direction"` // Device represents the network device to be affected. // +optional Device string `json:"device,omitempty"` RawRuleSource `json:",inline"` }
func (in *RawIptables) DeepCopy() *RawIptables
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawIptables.
func (in *RawIptables) DeepCopyInto(out *RawIptables)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
RawRuleSource represents the name and namespace of the source network chaos
type RawRuleSource struct { Source string `json:"source"` }
func (in *RawRuleSource) DeepCopy() *RawRuleSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawRuleSource.
func (in *RawRuleSource) DeepCopyInto(out *RawRuleSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
RawTrafficControl represents the traffic control chaos on specific pod
type RawTrafficControl struct { // The type of traffic control Type TcType `json:"type"` TcParameter `json:",inline"` // The name of target ipset // +optional IPSet string `json:"ipset,omitempty"` // The name and namespace of the source network chaos Source string `json:"source"` // Device represents the network device to be affected. // +optional Device string `json:"device,omitempty"` }
func (in *RawTrafficControl) DeepCopy() *RawTrafficControl
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawTrafficControl.
func (in *RawTrafficControl) DeepCopyInto(out *RawTrafficControl)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Record struct { Id string `json:"id"` SelectorKey string `json:"selectorKey"` Phase Phase `json:"phase"` // InjectedCount is a counter to record the sum of successful injections InjectedCount int `json:"injectedCount"` // RecoveredCount is a counter to record the sum of successful recoveries RecoveredCount int `json:"recoveredCount"` // Events are the essential details about the injections and recoveries Events []RecordEvent `json:"events,omitempty"` }
func (in *Record) DeepCopy() *Record
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Record.
func (in *Record) DeepCopyInto(out *Record)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecordEvent struct { // Type means the stage of this event Type RecordEventType `json:"type"` // Operation represents the operation we are doing, when we crate this event Operation RecordEventOperation `json:"operation"` // Message is the detail message, e.g. the reason why we failed to inject the chaos Message string `json:"message,omitempty"` // Timestamp is time when we create this event Timestamp *metav1.Time `json:"timestamp"` }
func NewRecordEvent(eventType RecordEventType, eventStage RecordEventOperation, msg string, time metav1.Time) *RecordEvent
NewRecordEvent is a constructor of RecordEvent in status
func (in *RecordEvent) DeepCopy() *RecordEvent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecordEvent.
func (in *RecordEvent) DeepCopyInto(out *RecordEvent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecordEventOperation string
const ( // Apply means this event is recorded, when we inject the chaos // typically, when we call impl.Apply() Apply RecordEventOperation = "Apply" // Recover means this event is recorded, when we recover the chaos // typically, when we call impl.Recover() Recover RecordEventOperation = "Recover" )
type RecordEventType string
const ( // TypeSucceeded means the stage of this event is successful TypeSucceeded RecordEventType = "Succeeded" // TypeFailed means the stage of this event is failed TypeFailed RecordEventType = "Failed" )
type RedisCacheLimitSpec struct { RedisCommonSpec `json:",inline"` // The size of `maxmemory` Size string `json:"cacheSize,omitempty"` // Specifies maxmemory as a percentage of the original value Percent string `json:"percent,omitempty"` }
func (in *RedisCacheLimitSpec) DeepCopy() *RedisCacheLimitSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisCacheLimitSpec.
func (in *RedisCacheLimitSpec) DeepCopyInto(out *RedisCacheLimitSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisCommonSpec struct { // The adress of Redis server Addr string `json:"addr,omitempty"` // The password of Redis server Password string `json:"password,omitempty"` }
func (in *RedisCommonSpec) DeepCopy() *RedisCommonSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisCommonSpec.
func (in *RedisCommonSpec) DeepCopyInto(out *RedisCommonSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisExpirationSpec struct { RedisCommonSpec `json:",inline"` // The expiration of the keys Expiration string `json:"expiration,omitempty"` // The keys to be expired Key string `json:"key,omitempty"` // Additional options for `expiration` Option string `json:"option,omitempty"` }
func (in *RedisExpirationSpec) DeepCopy() *RedisExpirationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisExpirationSpec.
func (in *RedisExpirationSpec) DeepCopyInto(out *RedisExpirationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisPenetrationSpec struct { RedisCommonSpec `json:",inline"` // The number of requests to be sent RequestNum int `json:"requestNum,omitempty"` }
func (in *RedisPenetrationSpec) DeepCopy() *RedisPenetrationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisPenetrationSpec.
func (in *RedisPenetrationSpec) DeepCopyInto(out *RedisPenetrationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisSentinelRestartSpec struct { RedisCommonSpec `json:",inline"` // The path of Sentinel conf Conf string `json:"conf,omitempty"` // The control flag determines whether to flush config FlushConfig bool `json:"flushConfig,omitempty"` // The path of `redis-server` command-line tool RedisPath bool `json:"redisPath,omitempty"` }
func (in *RedisSentinelRestartSpec) DeepCopy() *RedisSentinelRestartSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSentinelRestartSpec.
func (in *RedisSentinelRestartSpec) DeepCopyInto(out *RedisSentinelRestartSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisSentinelStopSpec struct { RedisCommonSpec `json:",inline"` // The path of Sentinel conf Conf string `json:"conf,omitempty"` // The control flag determines whether to flush config FlushConfig bool `json:"flushConfig,omitempty"` // The path of `redis-server` command-line tool RedisPath bool `json:"redisPath,omitempty"` }
func (in *RedisSentinelStopSpec) DeepCopy() *RedisSentinelStopSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSentinelStopSpec.
func (in *RedisSentinelStopSpec) DeepCopyInto(out *RedisSentinelStopSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster +kubebuilder:subresource:status +chaos-mesh:base RemoteCluster defines a remote cluster
type RemoteCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RemoteClusterSpec `json:"spec,omitempty"` // +optional Status RemoteClusterStatus `json:"status,omitempty"` }
func (in *RemoteCluster) DeepCopy() *RemoteCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteCluster.
func (in *RemoteCluster) DeepCopyInto(out *RemoteCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RemoteCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *RemoteCluster) Default()
func (in *RemoteCluster) Validate() ([]string, error)
func (in *RemoteCluster) ValidateCreate() (admission.Warnings, error)
func (in *RemoteCluster) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *RemoteCluster) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type RemoteClusterCondition struct { Type RemoteClusterConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` // +optional Reason string `json:"reason"` }
func (in *RemoteClusterCondition) DeepCopy() *RemoteClusterCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteClusterCondition.
func (in *RemoteClusterCondition) DeepCopyInto(out *RemoteClusterCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemoteClusterConditionType string
var ( RemoteClusterConditionInstalled RemoteClusterConditionType = "Installed" RemoteClusterConditionReady RemoteClusterConditionType = "Ready" )
RemoteClusterKubeConfig refers to a secret by which we'll use to connect remote cluster
type RemoteClusterKubeConfig struct { SecretRef RemoteClusterSecretRef `json:"secretRef"` }
func (in *RemoteClusterKubeConfig) DeepCopy() *RemoteClusterKubeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteClusterKubeConfig.
func (in *RemoteClusterKubeConfig) DeepCopyInto(out *RemoteClusterKubeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
RemoteClusterList contains a list of RemoteCluster +kubebuilder:object:root=true
type RemoteClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []RemoteCluster `json:"items"` }
func (in *RemoteClusterList) DeepCopy() *RemoteClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteClusterList.
func (in *RemoteClusterList) DeepCopyInto(out *RemoteClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RemoteClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
RemoteClusterSecretRef refers to a secret in any namespaces
type RemoteClusterSecretRef struct { Namespace string `json:"namespace"` Name string `json:"name"` Key string `json:"key"` }
func (in *RemoteClusterSecretRef) DeepCopy() *RemoteClusterSecretRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteClusterSecretRef.
func (in *RemoteClusterSecretRef) DeepCopyInto(out *RemoteClusterSecretRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
RemoteClusterSpec defines the specification of a remote cluster
type RemoteClusterSpec struct { Namespace string `json:"namespace"` Version string `json:"version"` KubeConfig RemoteClusterKubeConfig `json:"kubeConfig"` // +optional // +kubebuilder:validation:Schemaless // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Type=object ConfigOverride json.RawMessage `json:"configOverride,omitempty"` }
func (in *RemoteClusterSpec) DeepCopy() *RemoteClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteClusterSpec.
func (in *RemoteClusterSpec) DeepCopyInto(out *RemoteClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemoteClusterStatus struct { CurrentVersion string `json:"currentVersion"` // Conditions represents the current condition of the remote cluster // +optional Conditions []RemoteClusterCondition `json:"conditions,omitempty"` ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
func (in *RemoteClusterStatus) DeepCopy() *RemoteClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteClusterStatus.
func (in *RemoteClusterStatus) DeepCopyInto(out *RemoteClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+kubebuilder:object:generate=false
type RemoteObject interface { StatefulObject GetRemoteCluster() string }
ReorderSpec defines details of packet reorder.
type ReorderSpec struct { Reorder string `json:"reorder" webhook:"FloatStr"` // +optional Correlation string `json:"correlation,omitempty" default:"0" webhook:"FloatStr"` Gap int `json:"gap"` }
func (in *ReorderSpec) DeepCopy() *ReorderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReorderSpec.
func (in *ReorderSpec) DeepCopyInto(out *ReorderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Schedule is the cronly schedule object
type Schedule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ScheduleSpec `json:"spec"` // +optional Status ScheduleStatus `json:"status,omitempty"` }
func (in *Schedule) DeepCopy() *Schedule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Schedule.
func (in *Schedule) DeepCopyInto(out *Schedule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Schedule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Schedule) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (in *Schedule) IsPaused() bool
func (in *Schedule) Validate() ([]string, error)
Validate validates chaos object
func (in *Schedule) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (in *Schedule) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *Schedule) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type ScheduleItem struct { EmbedChaos `json:",inline"` // +optional Workflow *WorkflowSpec `json:"workflow,omitempty"` }
func (in *ScheduleItem) DeepCopy() *ScheduleItem
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduleItem.
func (in *ScheduleItem) DeepCopyInto(out *ScheduleItem)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (it *ScheduleItem) RestoreChaosSpec(root interface{}) error
func (it *ScheduleItem) SpawnNewObject(templateType ScheduleTemplateType) (GenericChaos, error)
ScheduleList contains a list of Schedule
type ScheduleList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Schedule `json:"items"` }
func (in *ScheduleList) DeepCopy() *ScheduleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduleList.
func (in *ScheduleList) DeepCopyInto(out *ScheduleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScheduleList) DeepCopyList() GenericChaosList
func (in *ScheduleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ScheduleList) GetItems() []GenericChaos
ScheduleSpec is the specification of a schedule object
type ScheduleSpec struct { Schedule string `json:"schedule"` // +optional // +nullable // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:ExclusiveMinimum=true StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds"` // +optional // +kubebuilder:default=Forbid // +kubebuilder:validation:Enum=Forbid;Allow ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy"` // +optional // +kubebuilder:validation:Minimum=1 HistoryLimit int `json:"historyLimit,omitempty"` Type ScheduleTemplateType `json:"type"` ScheduleItem `json:",inline"` }
func (in *ScheduleSpec) DeepCopy() *ScheduleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduleSpec.
func (in *ScheduleSpec) DeepCopyInto(out *ScheduleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScheduleSpec) Validate() field.ErrorList
ScheduleStatus is the status of a schedule object
type ScheduleStatus struct { // +optional Active []corev1.ObjectReference `json:"active,omitempty"` // +optional // +nullable LastScheduleTime metav1.Time `json:"time,omitempty"` }
func (in *ScheduleStatus) DeepCopy() *ScheduleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScheduleStatus.
func (in *ScheduleStatus) DeepCopyInto(out *ScheduleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScheduleTemplateType string
const ( ScheduleTypeAWSChaos ScheduleTemplateType = "AWSChaos" ScheduleTypeAzureChaos ScheduleTemplateType = "AzureChaos" ScheduleTypeBlockChaos ScheduleTemplateType = "BlockChaos" ScheduleTypeDNSChaos ScheduleTemplateType = "DNSChaos" ScheduleTypeGCPChaos ScheduleTemplateType = "GCPChaos" ScheduleTypeHTTPChaos ScheduleTemplateType = "HTTPChaos" ScheduleTypeIOChaos ScheduleTemplateType = "IOChaos" ScheduleTypeJVMChaos ScheduleTemplateType = "JVMChaos" ScheduleTypeKernelChaos ScheduleTemplateType = "KernelChaos" ScheduleTypeNetworkChaos ScheduleTemplateType = "NetworkChaos" ScheduleTypePhysicalMachineChaos ScheduleTemplateType = "PhysicalMachineChaos" ScheduleTypePodChaos ScheduleTemplateType = "PodChaos" ScheduleTypeStressChaos ScheduleTemplateType = "StressChaos" ScheduleTypeTimeChaos ScheduleTemplateType = "TimeChaos" ScheduleTypeWorkflow ScheduleTemplateType = "Workflow" )
SelectorMode represents the mode to run chaos action.
type SelectorMode string
const ( // OneMode represents that the system will do the chaos action on one object selected randomly. OneMode SelectorMode = "one" // AllMode represents that the system will do the chaos action on all objects // regardless of status (not ready or not running pods includes). // Use this label carefully. AllMode SelectorMode = "all" // FixedMode represents that the system will do the chaos action on a specific number of running objects. FixedMode SelectorMode = "fixed" // FixedPercentMode to specify a fixed % that can be inject chaos action. FixedPercentMode SelectorMode = "fixed-percent" // RandomMaxPercentMode to specify a maximum % that can be inject chaos action. RandomMaxPercentMode SelectorMode = "random-max-percent" )
StatefulObject defines a basic Object that can get the status
type StatefulObject interface { GenericChaos GetStatus() *ChaosStatus }
+kubebuilder:object:root=true +kubebuilder:subresource:status +chaos-mesh:base
type StatusCheck struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the behavior of a status check Spec StatusCheckSpec `json:"spec"` // +optional // Most recently observed status of status check Status StatusCheckStatus `json:"status,omitempty"` }
func (in *StatusCheck) DeepCopy() *StatusCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCheck.
func (in *StatusCheck) DeepCopyInto(out *StatusCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StatusCheck) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *StatusCheck) Default()
func (in *StatusCheck) DurationExceed(now time.Time) (bool, time.Duration, error)
func (in *StatusCheck) IsCompleted() bool
IsCompleted checks if the status check is completed, according to the StatusCheckConditionCompleted condition.
func (in *StatusCheck) Validate() ([]string, error)
func (in *StatusCheck) ValidateCreate() (admission.Warnings, error)
func (in *StatusCheck) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *StatusCheck) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type StatusCheckCondition struct { Type StatusCheckConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` Reason StatusCheckReason `json:"reason"` LastProbeTime *metav1.Time `json:"lastProbeTime"` LastTransitionTime *metav1.Time `json:"lastTransitionTime"` }
func (in *StatusCheckCondition) DeepCopy() *StatusCheckCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCheckCondition.
func (in *StatusCheckCondition) DeepCopyInto(out *StatusCheckCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusCheckConditionType string
const ( // StatusCheckConditionCompleted means the status check is completed. // It will be `True`, in the following scenarios: // 1. the duration is exceeded // 2. the failure threshold is exceeded // 3. the success threshold is exceeded (only the `Synchronous` mode) StatusCheckConditionCompleted StatusCheckConditionType = "Completed" // StatusCheckConditionDurationExceed means the duration is exceeded. StatusCheckConditionDurationExceed StatusCheckConditionType = "DurationExceed" // StatusCheckConditionFailureThresholdExceed means the failure threshold is exceeded. StatusCheckConditionFailureThresholdExceed StatusCheckConditionType = "FailureThresholdExceed" // StatusCheckConditionSuccessThresholdExceed means the success threshold is exceeded. StatusCheckConditionSuccessThresholdExceed StatusCheckConditionType = "SuccessThresholdExceed" )
StatusCheckList contains a list of StatusCheck +kubebuilder:object:root=true
type StatusCheckList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []StatusCheck `json:"items"` }
func (in *StatusCheckList) DeepCopy() *StatusCheckList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCheckList.
func (in *StatusCheckList) DeepCopyInto(out *StatusCheckList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StatusCheckList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type StatusCheckMode string
const ( // StatusCheckSynchronous means the status check will exit // immediately after success or failure. StatusCheckSynchronous StatusCheckMode = "Synchronous" // StatusCheckContinuous means the status check will continue to // execute until the duration is exceeded or the status check fails. StatusCheckContinuous StatusCheckMode = "Continuous" )
type StatusCheckOutcome string
const ( StatusCheckOutcomeSuccess StatusCheckOutcome = "Success" StatusCheckOutcomeFailure StatusCheckOutcome = "Failure" )
type StatusCheckReason string
const ( StatusCheckDurationExceed StatusCheckReason = "StatusCheckDurationExceed" StatusCheckFailureThresholdExceed StatusCheckReason = "StatusCheckFailureThresholdExceed" StatusCheckSuccessThresholdExceed StatusCheckReason = "StatusCheckSuccessThresholdExceed" StatusCheckExecutionFailed StatusCheckReason = "StatusCheckExecutionFailed" StatusCheckExecutionSucceed StatusCheckReason = "StatusCheckExecutionSucceed" )
type StatusCheckRecord struct { StartTime *metav1.Time `json:"startTime"` Outcome StatusCheckOutcome `json:"outcome"` }
func (in *StatusCheckRecord) DeepCopy() *StatusCheckRecord
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCheckRecord.
func (in *StatusCheckRecord) DeepCopyInto(out *StatusCheckRecord)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusCheckSpec struct { // Mode defines the execution mode of the status check. // Support type: Synchronous / Continuous // +optional // +kubebuilder:validation:Enum=Synchronous;Continuous Mode StatusCheckMode `json:"mode,omitempty"` // Type defines the specific status check type. // Support type: HTTP // +kubebuilder:default=HTTP // +kubebuilder:validation:Enum=HTTP Type StatusCheckType `json:"type"` // Duration defines the duration of the whole status check if the // number of failed execution does not exceed the failure threshold. // Duration is available to both `Synchronous` and `Continuous` mode. // A duration string is a possibly signed sequence of // decimal numbers, each with optional fraction and a unit suffix, // such as "300ms", "-1.5h" or "2h45m". // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // TimeoutSeconds defines the number of seconds after which // an execution of status check times out. // +optional // +kubebuilder:default=1 // +kubebuilder:validation:Minimum=1 TimeoutSeconds int `json:"timeoutSeconds,omitempty"` // IntervalSeconds defines how often (in seconds) to perform // an execution of status check. // +optional // +kubebuilder:default=10 // +kubebuilder:validation:Minimum=1 IntervalSeconds int `json:"intervalSeconds,omitempty"` // FailureThreshold defines the minimum consecutive failure // for the status check to be considered failed. // +optional // +kubebuilder:default=3 // +kubebuilder:validation:Minimum=1 FailureThreshold int `json:"failureThreshold,omitempty"` // SuccessThreshold defines the minimum consecutive successes // for the status check to be considered successful. // SuccessThreshold only works for `Synchronous` mode. // +optional // +kubebuilder:default=1 // +kubebuilder:validation:Minimum=1 SuccessThreshold int `json:"successThreshold,omitempty"` // RecordsHistoryLimit defines the number of record to retain. // +optional // +kubebuilder:default=100 // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=1000 RecordsHistoryLimit int `json:"recordsHistoryLimit,omitempty"` // +optional *EmbedStatusCheck `json:",inline,omitempty"` }
func (in *StatusCheckSpec) DeepCopy() *StatusCheckSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCheckSpec.
func (in *StatusCheckSpec) DeepCopyInto(out *StatusCheckSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StatusCheckSpec) Default(root interface{}, field *reflect.StructField)
func (in *StatusCheckSpec) GetDuration() (*time.Duration, error)
func (in *StatusCheckSpec) Validate(root interface{}, path *field.Path) field.ErrorList
type StatusCheckStatus struct { // StartTime represents time when the status check started to execute. // +optional StartTime *metav1.Time `json:"startTime,omitempty"` // CompletionTime represents time when the status check was completed. // +optional CompletionTime *metav1.Time `json:"completionTime,omitempty"` // Count represents the total number of the status check executed. // +optional Count int64 `json:"count,omitempty"` // Conditions represents the latest available observations of a StatusCheck's current state. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []StatusCheckCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // Records contains the history of the execution of StatusCheck. // +optional Records []StatusCheckRecord `json:"records,omitempty"` }
func (in *StatusCheckStatus) DeepCopy() *StatusCheckStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCheckStatus.
func (in *StatusCheckStatus) DeepCopyInto(out *StatusCheckStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
StatusCheckTemplate represents a template of status check. A statusCheckTemplate would save in the ConfigMap named `template-status-check-<template-name>`. +kubebuilder:object:generate=false
type StatusCheckTemplate struct { StatusCheckSpec `json:",inline"` }
func (in *StatusCheckTemplate) Default()
func (in *StatusCheckTemplate) Validate() (admission.Warnings, error)
type StatusCheckType string
const ( TypeHTTP StatusCheckType = "HTTP" )
type StatusCode string
func (in *StatusCode) Validate(root interface{}, path *field.Path) field.ErrorList
type StressCPUSpec struct { // specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading. Load int `json:"load,omitempty"` // specifies N workers to apply the stressor. Workers int `json:"workers,omitempty"` // extend stress-ng options Options []string `json:"options,omitempty"` }
func (in *StressCPUSpec) DeepCopy() *StressCPUSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressCPUSpec.
func (in *StressCPUSpec) DeepCopyInto(out *StressCPUSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
StressChaos is the Schema for the stresschaos API
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,omitempty"` }
func (in *StressChaos) DeepCopy() *StressChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressChaos.
func (in *StressChaos) DeepCopyInto(out *StressChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StressChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *StressChaos) Default()
func (in *StressChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (obj *StressChaos) GetCustomStatus() interface{}
func (in *StressChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *StressChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (obj *StressChaos) GetSelectorSpecs() map[string]interface{}
func (in *StressChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *StressChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *StressChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *StressChaos) IsOneShot() bool
func (in *StressChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *StressChaos) Validate() ([]string, error)
func (in *StressChaos) ValidateCreate() (admission.Warnings, error)
func (in *StressChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *StressChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
StressChaosList contains a list of StressChaos
type StressChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []StressChaos `json:"items"` }
func (in *StressChaosList) DeepCopy() *StressChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressChaosList.
func (in *StressChaosList) DeepCopyInto(out *StressChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StressChaosList) DeepCopyList() GenericChaosList
func (in *StressChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *StressChaosList) GetItems() []GenericChaos
func (in *StressChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
StressChaosSpec defines the desired state of StressChaos
type StressChaosSpec struct { ContainerSelector `json:",inline"` // Stressors defines plenty of stressors supported to stress system components out. // You can use one or more of them to make up various kinds of stresses. At least // one of the stressors should be specified. // +optional Stressors *Stressors `json:"stressors,omitempty"` // StressngStressors defines plenty of stressors just like `Stressors` except that it's an experimental // feature and more powerful. You can define stressors in `stress-ng` (see also `man stress-ng`) dialect, // however not all of the supported stressors are well tested. It maybe retired in later releases. You // should always use `Stressors` to define the stressors and use this only when you want more stressors // unsupported by `Stressors`. When both `StressngStressors` and `Stressors` are defined, `StressngStressors` // wins. // +optional StressngStressors string `json:"stressngStressors,omitempty"` // Duration represents the duration of the chaos action // +optional Duration *string `json:"duration,omitempty" webhook:"Duration"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *StressChaosSpec) DeepCopy() *StressChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressChaosSpec.
func (in *StressChaosSpec) DeepCopyInto(out *StressChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StressChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
func (in *StressChaosSpec) Validate(root interface{}, path *field.Path) field.ErrorList
Validate validates the scheduler and duration
StressChaosStatus defines the observed state of StressChaos
type StressChaosStatus struct { ChaosStatus `json:",inline"` // Instances always specifies stressing instances // +optional Instances map[string]StressInstance `json:"instances,omitempty"` }
func (in *StressChaosStatus) DeepCopy() *StressChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressChaosStatus.
func (in *StressChaosStatus) DeepCopyInto(out *StressChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
StressInstance is an instance generates stresses
type StressInstance struct { // UID is the stress-ng identifier // +optional UID string `json:"uid,omitempty"` // MemoryUID is the memStress identifier // +optional MemoryUID string `json:"memoryUid,omitempty"` // StartTime specifies when the stress-ng starts // +optional StartTime *metav1.Time `json:"startTime,omitempty"` // MemoryStartTime specifies when the memStress starts // +optional MemoryStartTime *metav1.Time `json:"memoryStartTime,omitempty"` }
func (in *StressInstance) DeepCopy() *StressInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressInstance.
func (in *StressInstance) DeepCopyInto(out *StressInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StressMemorySpec struct { // specifies N bytes consumed per vm worker, default is the total available memory. // One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB.. Size string `json:"size,omitempty"` // extend stress-ng options Options []string `json:"options,omitempty"` }
func (in *StressMemorySpec) DeepCopy() *StressMemorySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StressMemorySpec.
func (in *StressMemorySpec) DeepCopyInto(out *StressMemorySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Stressor defines common configurations of a stressor
type Stressor struct { // Workers specifies N workers to apply the stressor. // Maximum 8192 workers can run by stress-ng // +kubebuilder:validation:Maximum=8192 Workers int `json:"workers"` }
func (in *Stressor) DeepCopy() *Stressor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stressor.
func (in *Stressor) DeepCopyInto(out *Stressor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Stressor) Validate(parent *field.Path) field.ErrorList
Validate validates whether the Stressor is well defined
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
type Stressors struct { // MemoryStressor stresses virtual memory out // +optional MemoryStressor *MemoryStressor `json:"memory,omitempty"` // CPUStressor stresses CPU out // +optional CPUStressor *CPUStressor `json:"cpu,omitempty"` }
func (in *Stressors) DeepCopy() *Stressors
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Stressors.
func (in *Stressors) DeepCopyInto(out *Stressors)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Stressors) Normalize() (cpuStressors string, memoryStressors string, err error)
Normalize the stressors to comply with stress-ng
func (in *Stressors) Validate(root interface{}, path *field.Path) field.ErrorList
Validate validates whether the Stressors are all well defined
type Task struct { // Container is the main container image to run in the pod Container *corev1.Container `json:"container,omitempty"` // Volumes is a list of volumes that can be mounted by containers in a template. // +patchStrategy=merge // +patchMergeKey=name Volumes []corev1.Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name"` }
func (in *Task) DeepCopy() *Task
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task.
func (in *Task) DeepCopyInto(out *Task)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
TcParameter represents the parameters for a traffic control chaos
type TcParameter struct { // Delay represents the detail about delay action // +ui:form:when=action=='delay' // +optional Delay *DelaySpec `json:"delay,omitempty"` // Loss represents the detail about loss action // +ui:form:when=action=='loss' // +optional Loss *LossSpec `json:"loss,omitempty"` // DuplicateSpec represents the detail about loss action // +ui:form:when=action=='duplicate' // +optional Duplicate *DuplicateSpec `json:"duplicate,omitempty"` // Corrupt represents the detail about corrupt action // +ui:form:when=action=='corrupt' // +optional Corrupt *CorruptSpec `json:"corrupt,omitempty"` // Bandwidth represents the detail about bandwidth control action // +ui:form:when=action=='bandwidth' // +optional Bandwidth *BandwidthSpec `json:"bandwidth,omitempty"` // Rate represents the detail about rate control action // +ui:form:when=action=='rate' // +optional Rate *RateSpec `json:"rate,omitempty"` }
func (in *TcParameter) DeepCopy() *TcParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TcParameter.
func (in *TcParameter) DeepCopyInto(out *TcParameter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
TcType the type of traffic control
type TcType string
const ( // Netem represents netem traffic control Netem TcType = "netem" // Bandwidth represents bandwidth shape traffic control Bandwidth TcType = "bandwidth" )
type Template struct { Name string `json:"name"` Type TemplateType `json:"templateType"` // +optional Deadline *string `json:"deadline,omitempty"` // Task describes the behavior of the custom task. Only used when Type is TypeTask. // +optional Task *Task `json:"task,omitempty"` // Children describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel. // +optional Children []string `json:"children,omitempty"` // ConditionalBranches describes the conditional branches of custom tasks. Only used when Type is TypeTask. // +optional ConditionalBranches []ConditionalBranch `json:"conditionalBranches,omitempty"` // EmbedChaos describe the chaos to be injected with chaos nodes. Only used when Type is Type<Something>Chaos. // +optional *EmbedChaos `json:",inline"` // Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule. // +optional Schedule *ChaosOnlyScheduleSpec `json:"schedule,omitempty"` // StatusCheck describe the behavior of StatusCheck. Only used when Type is TypeStatusCheck. // +optional StatusCheck *StatusCheckSpec `json:"statusCheck,omitempty"` // AbortWithStatusCheck describe whether to abort the workflow when the failure threshold of StatusCheck is exceeded. // Only used when Type is TypeStatusCheck. // +optional AbortWithStatusCheck bool `json:"abortWithStatusCheck,omitempty"` }
func (in *Template) DeepCopy() *Template
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.
func (in *Template) DeepCopyInto(out *Template)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplateType string
const ( TypeTask TemplateType = "Task" TypeSerial TemplateType = "Serial" TypeParallel TemplateType = "Parallel" TypeSuspend TemplateType = "Suspend" TypeSchedule TemplateType = "Schedule" TypeStatusCheck TemplateType = "StatusCheck" )
const ( TypeAWSChaos TemplateType = "AWSChaos" TypeAzureChaos TemplateType = "AzureChaos" TypeBlockChaos TemplateType = "BlockChaos" TypeDNSChaos TemplateType = "DNSChaos" TypeGCPChaos TemplateType = "GCPChaos" TypeHTTPChaos TemplateType = "HTTPChaos" TypeIOChaos TemplateType = "IOChaos" TypeJVMChaos TemplateType = "JVMChaos" TypeKernelChaos TemplateType = "KernelChaos" TypeNetworkChaos TemplateType = "NetworkChaos" TypePhysicalMachineChaos TemplateType = "PhysicalMachineChaos" TypePodChaos TemplateType = "PodChaos" TypeStressChaos TemplateType = "StressChaos" TypeTimeChaos TemplateType = "TimeChaos" )
TimeChaos is the Schema for the timechaos API
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,omitempty"` }
func (in *TimeChaos) DeepCopy() *TimeChaos
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeChaos.
func (in *TimeChaos) DeepCopyInto(out *TimeChaos)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TimeChaos) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *TimeChaos) Default()
func (in *TimeChaos) DurationExceeded(now time.Time) (bool, time.Duration, error)
func (in *TimeChaos) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta would return the ObjectMeta for chaos
func (in *TimeChaos) GetRemoteCluster() string
GetRemoteCluster returns the remoteCluster
func (in *TimeChaos) GetSelectorSpecs() map[string]interface{}
func (in *TimeChaos) GetSpecAndMetaString() (string, error)
GetSpecAndMetaString returns a string including the meta and spec field of this chaos object.
func (in *TimeChaos) GetStatus() *ChaosStatus
GetStatus returns the status
func (in *TimeChaos) IsDeleted() bool
IsDeleted returns whether this resource has been deleted
func (in *TimeChaos) IsOneShot() bool
func (in *TimeChaos) IsPaused() bool
IsPaused returns whether this resource has been paused
func (in *TimeChaos) Validate() ([]string, error)
func (in *TimeChaos) ValidateCreate() (admission.Warnings, error)
func (in *TimeChaos) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (in *TimeChaos) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
TimeChaosList contains a list of TimeChaos
type TimeChaosList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []TimeChaos `json:"items"` }
func (in *TimeChaosList) DeepCopy() *TimeChaosList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeChaosList.
func (in *TimeChaosList) DeepCopyInto(out *TimeChaosList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TimeChaosList) DeepCopyList() GenericChaosList
func (in *TimeChaosList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *TimeChaosList) GetItems() []GenericChaos
func (in *TimeChaosList) ListChaos() []GenericChaos
ListChaos returns a list of chaos
TimeChaosSpec defines the desired state of TimeChaos
type TimeChaosSpec struct { ContainerSelector `json:",inline"` // TimeOffset defines the delta time of injected program. It's a possibly signed sequence of decimal numbers, such as // "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". TimeOffset string `json:"timeOffset" webhook:"TimeOffset"` // ClockIds defines all affected clock id // All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", // "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", // "CLOCK_BOOTTIME_ALARM"] // Default value is ["CLOCK_REALTIME"] ClockIds []string `json:"clockIds,omitempty" webhook:"ClockIds,nilable"` // Duration represents the duration of the chaos action Duration *string `json:"duration,omitempty"` // RemoteCluster represents the remote cluster where the chaos will be deployed // +optional RemoteCluster string `json:"remoteCluster,omitempty"` }
func (in *TimeChaosSpec) DeepCopy() *TimeChaosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeChaosSpec.
func (in *TimeChaosSpec) DeepCopyInto(out *TimeChaosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TimeChaosSpec) GetDuration() (*time.Duration, error)
GetDuration would return the duration for chaos
TimeChaosStatus defines the observed state of TimeChaos
type TimeChaosStatus struct { ChaosStatus `json:",inline"` }
func (in *TimeChaosStatus) DeepCopy() *TimeChaosStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeChaosStatus.
func (in *TimeChaosStatus) DeepCopyInto(out *TimeChaosStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TimeOffset string
func (in *TimeOffset) Validate(root interface{}, path *field.Path) field.ErrorList
Timespec represents a time
type Timespec struct { Sec int64 `json:"sec"` Nsec int64 `json:"nsec"` }
func (in *Timespec) DeepCopy() *Timespec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timespec.
func (in *Timespec) DeepCopyInto(out *Timespec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserDefinedSpec struct { // The command to be executed when attack AttackCmd string `json:"attackCmd,omitempty"` // The command to be executed when recover RecoverCmd string `json:"recoverCmd,omitempty"` }
func (in *UserDefinedSpec) DeepCopy() *UserDefinedSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserDefinedSpec.
func (in *UserDefinedSpec) DeepCopyInto(out *UserDefinedSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMSpec struct { // The name of the VM to be injected VMName string `json:"vm-name,omitempty"` }
func (in *VMSpec) DeepCopy() *VMSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMSpec.
func (in *VMSpec) DeepCopyInto(out *VMSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
WebhookObject is basic Object which implement `webhook.Validator` and `webhook.Defaulter`
type WebhookObject interface { webhook.Validator webhook.Defaulter }
+kubebuilder:object:root=true +kubebuilder:resource:shortName=wf +kubebuilder:subresource:status +chaos-mesh:experiment
type Workflow struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the behavior of a workflow Spec WorkflowSpec `json:"spec"` // +optional // Most recently observed status of the workflow Status WorkflowStatus `json:"status"` }
func (in *Workflow) DeepCopy() *Workflow
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workflow.
func (in *Workflow) DeepCopyInto(out *Workflow)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Workflow) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Workflow) Default()
func (in *Workflow) GetObjectMeta() *metav1.ObjectMeta
func (in *Workflow) ValidateCreate() (admission.Warnings, error)
func (in *Workflow) ValidateDelete() (admission.Warnings, error)
func (in *Workflow) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
type WorkflowCondition struct { Type WorkflowConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` Reason string `json:"reason"` StartTime *metav1.Time `json:"startTime,omitempty"` }
func (in *WorkflowCondition) DeepCopy() *WorkflowCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowCondition.
func (in *WorkflowCondition) DeepCopyInto(out *WorkflowCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowConditionType string
const ( WorkflowConditionAccomplished WorkflowConditionType = "Accomplished" WorkflowConditionScheduled WorkflowConditionType = "Scheduled" )
+kubebuilder:object:root=true
type WorkflowList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Workflow `json:"items"` }
func (in *WorkflowList) DeepCopy() *WorkflowList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowList.
func (in *WorkflowList) DeepCopyInto(out *WorkflowList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowList) DeepCopyList() GenericChaosList
TODO: refactor: not so accurate
func (in *WorkflowList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *WorkflowList) GetItems() []GenericChaos
+kubebuilder:object:root=true +kubebuilder:resource:shortName=wfn +kubebuilder:subresource:status
type WorkflowNode struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the behavior of a node of workflow Spec WorkflowNodeSpec `json:"spec"` // +optional // Most recently observed status of the workflow node Status WorkflowNodeStatus `json:"status,omitempty"` }
func (in *WorkflowNode) DeepCopy() *WorkflowNode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNode.
func (in *WorkflowNode) DeepCopyInto(out *WorkflowNode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowNode) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkflowNodeCondition struct { Type WorkflowNodeConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` Reason string `json:"reason"` }
func (in *WorkflowNodeCondition) DeepCopy() *WorkflowNodeCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeCondition.
func (in *WorkflowNodeCondition) DeepCopyInto(out *WorkflowNodeCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowNodeConditionType string
const ( ConditionAccomplished WorkflowNodeConditionType = "Accomplished" ConditionDeadlineExceed WorkflowNodeConditionType = "DeadlineExceed" ConditionChaosInjected WorkflowNodeConditionType = "ChaosInjected" ConditionAborted WorkflowNodeConditionType = "Aborted" )
+kubebuilder:object:root=true
type WorkflowNodeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []WorkflowNode `json:"items"` }
func (in *WorkflowNodeList) DeepCopy() *WorkflowNodeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeList.
func (in *WorkflowNodeList) DeepCopyInto(out *WorkflowNodeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowNodeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkflowNodeSpec struct { TemplateName string `json:"templateName"` WorkflowName string `json:"workflowName"` Type TemplateType `json:"type"` StartTime *metav1.Time `json:"startTime"` // +optional Deadline *metav1.Time `json:"deadline,omitempty"` // +optional Task *Task `json:"task,omitempty"` // +optional Children []string `json:"children,omitempty"` // +optional ConditionalBranches []ConditionalBranch `json:"conditionalBranches,omitempty"` // +optional *EmbedChaos `json:",inline,omitempty"` // +optional Schedule *ScheduleSpec `json:"schedule,omitempty"` // StatusCheck describe the behavior of StatusCheck. Only used when Type is TypeStatusCheck. // +optional StatusCheck *StatusCheckSpec `json:"statusCheck,omitempty"` // AbortWithStatusCheck describe whether to abort the workflow when the failure threshold of StatusCheck is exceeded. // Only used when Type is TypeStatusCheck. // +optional AbortWithStatusCheck bool `json:"abortWithStatusCheck,omitempty"` }
func (in *WorkflowNodeSpec) DeepCopy() *WorkflowNodeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeSpec.
func (in *WorkflowNodeSpec) DeepCopyInto(out *WorkflowNodeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowNodeStatus struct { // ChaosResource refs to the real chaos CR object. // +optional ChaosResource *corev1.TypedLocalObjectReference `json:"chaosResource,omitempty"` // ConditionalBranchesStatus records the evaluation result of each ConditionalBranch // +optional ConditionalBranchesStatus *ConditionalBranchesStatus `json:"conditionalBranchesStatus,omitempty"` // ActiveChildren means the created children node // +optional ActiveChildren []corev1.LocalObjectReference `json:"activeChildren,omitempty"` // Children is necessary for representing the order when replicated child template references by parent template. // +optional FinishedChildren []corev1.LocalObjectReference `json:"finishedChildren,omitempty"` // Represents the latest available observations of a workflow node's current state. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []WorkflowNodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
func (in *WorkflowNodeStatus) DeepCopy() *WorkflowNodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeStatus.
func (in *WorkflowNodeStatus) DeepCopyInto(out *WorkflowNodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowSpec struct { Entry string `json:"entry"` Templates []Template `json:"templates"` }
func (in *WorkflowSpec) DeepCopy() *WorkflowSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSpec.
func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkflowStatus struct { // +optional EntryNode *string `json:"entryNode,omitempty"` // +optional StartTime *metav1.Time `json:"startTime,omitempty"` // +optional EndTime *metav1.Time `json:"endTime,omitempty"` // Represents the latest available observations of a workflow's current state. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []WorkflowCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
func (in *WorkflowStatus) DeepCopy() *WorkflowStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus.
func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.