Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the inject v1alpha1 API group +kubebuilder:object:generate=true +groupName=chaosmeta.io
Index ¶
- Constants
- Variables
- func ConvertDuration(d string) (time.Duration, error)
- type ArgsUnit
- type CloudTargetType
- type Experiment
- func (in *Experiment) DeepCopy() *Experiment
- func (in *Experiment) DeepCopyInto(out *Experiment)
- func (in *Experiment) DeepCopyObject() runtime.Object
- func (r *Experiment) Default()
- func (r *Experiment) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Experiment) ValidateCreate() error
- func (r *Experiment) ValidateDelete() error
- func (r *Experiment) ValidateUpdate(old runtime.Object) error
- type ExperimentCommon
- type ExperimentDetail
- type ExperimentDetailUnit
- type ExperimentList
- type ExperimentSpec
- type ExperimentStatus
- type PhaseType
- type RangeMode
- type RangeType
- type ScopeType
- type SelectorUnit
- type StatusType
- type VType
Constants ¶
const ( ArgsListSplit = "," LabelListSplit = "=" FinalizerName = "chaosmeta/experiment" ContainerKey = "containername" FirstContainer = "firstcontainer" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "chaosmeta.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
Types ¶
type ArgsUnit ¶
type ArgsUnit struct { Key string `json:"key"` Value string `json:"value"` ValueType VType `json:"valueType,omitempty"` }
func (*ArgsUnit) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgsUnit.
func (*ArgsUnit) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CloudTargetType ¶
type CloudTargetType string
const ( ClusterCloudTarget CloudTargetType = "cluster" PodCloudTarget CloudTargetType = "pod" NodeCloudTarget CloudTargetType = "node" DeploymentCloudTarget CloudTargetType = "deployment" StatefulsetCloudTarget CloudTargetType = "statefulset" DaemonsetCloudTarget CloudTargetType = "daemonset" NamespaceCloudTarget CloudTargetType = "namespace" JobCloudTarget CloudTargetType = "job" )
type Experiment ¶
type Experiment struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ExperimentSpec `json:"spec,omitempty"` Status ExperimentStatus `json:"status,omitempty"` }
Experiment is the Schema for the experiments API
func (*Experiment) DeepCopy ¶
func (in *Experiment) DeepCopy() *Experiment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Experiment.
func (*Experiment) DeepCopyInto ¶
func (in *Experiment) DeepCopyInto(out *Experiment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Experiment) DeepCopyObject ¶
func (in *Experiment) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Experiment) Default ¶
func (r *Experiment) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Experiment) SetupWebhookWithManager ¶
func (r *Experiment) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*Experiment) ValidateCreate ¶
func (r *Experiment) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Experiment) ValidateDelete ¶
func (r *Experiment) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*Experiment) ValidateUpdate ¶
func (r *Experiment) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type ExperimentCommon ¶
type ExperimentCommon struct { // Duration support "h", "m", "s" Duration string `json:"duration,omitempty"` Target string `json:"target"` Fault string `json:"fault"` Args []ArgsUnit `json:"args,omitempty"` }
func (*ExperimentCommon) DeepCopy ¶
func (in *ExperimentCommon) DeepCopy() *ExperimentCommon
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentCommon.
func (*ExperimentCommon) DeepCopyInto ¶
func (in *ExperimentCommon) DeepCopyInto(out *ExperimentCommon)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExperimentDetail ¶
type ExperimentDetail struct { Inject []ExperimentDetailUnit `json:"inject,omitempty"` Recover []ExperimentDetailUnit `json:"recover,omitempty"` }
func (*ExperimentDetail) DeepCopy ¶
func (in *ExperimentDetail) DeepCopy() *ExperimentDetail
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentDetail.
func (*ExperimentDetail) DeepCopyInto ¶
func (in *ExperimentDetail) DeepCopyInto(out *ExperimentDetail)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExperimentDetailUnit ¶
type ExperimentDetailUnit struct { InjectObjectName string `json:"injectObjectName,omitempty"` //InjectObjectInfo string `json:"injectObjectInfo,omitempty"` UID string `json:"uid,omitempty"` Message string `json:"message,omitempty"` Status StatusType `json:"status,omitempty"` StartTime string `json:"startTime,omitempty"` UpdateTime string `json:"updateTime,omitempty"` Backup string `json:"backup,omitempty"` }
func (*ExperimentDetailUnit) DeepCopy ¶
func (in *ExperimentDetailUnit) DeepCopy() *ExperimentDetailUnit
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentDetailUnit.
func (*ExperimentDetailUnit) DeepCopyInto ¶
func (in *ExperimentDetailUnit) DeepCopyInto(out *ExperimentDetailUnit)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExperimentList ¶
type ExperimentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Experiment `json:"items"` }
ExperimentList contains a list of Experiment
func (*ExperimentList) DeepCopy ¶
func (in *ExperimentList) DeepCopy() *ExperimentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentList.
func (*ExperimentList) DeepCopyInto ¶
func (in *ExperimentList) DeepCopyInto(out *ExperimentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExperimentList) DeepCopyObject ¶
func (in *ExperimentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ExperimentSpec ¶
type ExperimentSpec struct { // Scope Optional: node, pod. type of experiment object Scope ScopeType `json:"scope"` RangeMode *RangeMode `json:"rangeMode,omitempty"` Experiment *ExperimentCommon `json:"experiment"` // Selector The internal part of unit is "AND", and the external part is "OR" and de-duplication Selector []SelectorUnit `json:"selector,omitempty"` TargetPhase PhaseType `json:"targetPhase"` }
ExperimentSpec defines the desired state of Experiment
func (*ExperimentSpec) DeepCopy ¶
func (in *ExperimentSpec) DeepCopy() *ExperimentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentSpec.
func (*ExperimentSpec) DeepCopyInto ¶
func (in *ExperimentSpec) DeepCopyInto(out *ExperimentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExperimentStatus ¶
type ExperimentStatus struct { Phase PhaseType `json:"phase"` Status StatusType `json:"status"` Message string `json:"message"` Detail ExperimentDetail `json:"detail"` CreateTime string `json:"createTime"` UpdateTime string `json:"updateTime"` }
ExperimentStatus defines the observed state of Experiment
func (*ExperimentStatus) DeepCopy ¶
func (in *ExperimentStatus) DeepCopy() *ExperimentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentStatus.
func (*ExperimentStatus) DeepCopyInto ¶
func (in *ExperimentStatus) DeepCopyInto(out *ExperimentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RangeMode ¶
type RangeMode struct { // Type Optional: all、percent、count Type RangeType `json:"type"` Value int `json:"value,omitempty"` }
func (*RangeMode) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RangeMode.
func (*RangeMode) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SelectorUnit ¶
type SelectorUnit struct { Namespace string `json:"namespace,omitempty"` Name []string `json:"name,omitempty"` IP []string `json:"ip,omitempty"` Label map[string]string `json:"label,omitempty"` SubName string `json:"subName,omitempty"` }
func (*SelectorUnit) DeepCopy ¶
func (in *SelectorUnit) DeepCopy() *SelectorUnit
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectorUnit.
func (*SelectorUnit) DeepCopyInto ¶
func (in *SelectorUnit) DeepCopyInto(out *SelectorUnit)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusType ¶
type StatusType string
const ( CreatedStatusType StatusType = "created" SuccessStatusType StatusType = "success" FailedStatusType StatusType = "failed" RunningStatusType StatusType = "running" PartSuccessStatusType StatusType = "partSuccess" )