Documentation ¶
Overview ¶
chaos-meshorg
Index ¶
- func NewPodIoChaos_Override(p PodIoChaos, scope constructs.Construct, id *string, props *PodIoChaosProps)
- func PodIoChaos_GVK() *cdk8s.GroupVersionKind
- func PodIoChaos_IsConstruct(x interface{}) *bool
- func PodIoChaos_Manifest(props *PodIoChaosProps) interface{}
- func PodIoChaos_Of(c constructs.IConstruct) cdk8s.ApiObject
- type PodIoChaos
- type PodIoChaosProps
- type PodIoChaosSpec
- type PodIoChaosSpecActions
- type PodIoChaosSpecActionsAtime
- type PodIoChaosSpecActionsCtime
- type PodIoChaosSpecActionsFaults
- type PodIoChaosSpecActionsMistake
- type PodIoChaosSpecActionsMistakeFilling
- type PodIoChaosSpecActionsMtime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPodIoChaos_Override ¶
func NewPodIoChaos_Override(p PodIoChaos, scope constructs.Construct, id *string, props *PodIoChaosProps)
Defines a "PodIOChaos" API object.
func PodIoChaos_GVK ¶
func PodIoChaos_GVK() *cdk8s.GroupVersionKind
func PodIoChaos_IsConstruct ¶
func PodIoChaos_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func PodIoChaos_Manifest ¶
func PodIoChaos_Manifest(props *PodIoChaosProps) interface{}
Renders a Kubernetes manifest for "PodIOChaos".
This can be used to inline resource manifests inside other objects (e.g. as templates).
func PodIoChaos_Of ¶
func PodIoChaos_Of(c constructs.IConstruct) cdk8s.ApiObject
Returns the `ApiObject` named `Resource` which is a child of the given construct.
If `c` is an `ApiObject`, it is returned directly. Throws an exception if the construct does not have a child named `Default` _or_ if this child is not an `ApiObject`.
Types ¶
type PodIoChaos ¶
type PodIoChaos interface { cdk8s.ApiObject // The group portion of the API version (e.g. `authorization.k8s.io`). ApiGroup() *string // The object's API version (e.g. `authorization.k8s.io/v1`). ApiVersion() *string // The chart in which this object is defined. Chart() cdk8s.Chart // The object kind. Kind() *string // Metadata associated with this API object. Metadata() cdk8s.ApiObjectMetadataDefinition // The name of the API object. // // If a name is specified in `metadata.name` this will be the name returned. // Otherwise, a name will be generated by calling // `Chart.of(this).generatedObjectName(this)`, which by default uses the // construct path to generate a DNS-compatible name for the resource. Name() *string // The tree node. Node() constructs.Node // Create a dependency between this ApiObject and other constructs. // // These can be other ApiObjects, Charts, or custom. AddDependency(dependencies ...constructs.IConstruct) // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. // // Example: // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); // AddJsonPatch(ops ...cdk8s.JsonPatch) // Renders the object to Kubernetes JSON. ToJson() interface{} // Returns a string representation of this construct. ToString() *string }
PodIOChaos is the Schema for the podiochaos API.
func NewPodIoChaos ¶
func NewPodIoChaos(scope constructs.Construct, id *string, props *PodIoChaosProps) PodIoChaos
Defines a "PodIOChaos" API object.
type PodIoChaosProps ¶
type PodIoChaosProps struct { Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"` // PodIOChaosSpec defines the desired state of IOChaos. Spec *PodIoChaosSpec `field:"optional" json:"spec" yaml:"spec"` }
PodIOChaos is the Schema for the podiochaos API.
type PodIoChaosSpec ¶
type PodIoChaosSpec struct { // VolumeMountPath represents the target mount path It must be a root of mount path now. // // TODO: search the mount parent of any path automatically. TODO: support multiple different volume mount path in one pod VolumeMountPath *string `field:"required" json:"volumeMountPath" yaml:"volumeMountPath"` // Actions are a list of IOChaos actions. Actions *[]*PodIoChaosSpecActions `field:"optional" json:"actions" yaml:"actions"` // TODO: support multiple different container to inject in one pod. Container *string `field:"optional" json:"container" yaml:"container"` }
PodIOChaosSpec defines the desired state of IOChaos.
type PodIoChaosSpecActions ¶
type PodIoChaosSpecActions struct { // Path represents a glob of injecting path. Path *string `field:"required" json:"path" yaml:"path"` // Percent represents the percent probability of injecting this action. Percent *float64 `field:"required" json:"percent" yaml:"percent"` // IOChaosType represents the type of an IOChaos Action. Type *string `field:"required" json:"type" yaml:"type"` // Timespec represents a time. Atime *PodIoChaosSpecActionsAtime `field:"optional" json:"atime" yaml:"atime"` Blocks *float64 `field:"optional" json:"blocks" yaml:"blocks"` // Timespec represents a time. Ctime *PodIoChaosSpecActionsCtime `field:"optional" json:"ctime" yaml:"ctime"` // Faults represents the fault to inject. Faults *[]*PodIoChaosSpecActionsFaults `field:"optional" json:"faults" yaml:"faults"` Gid *float64 `field:"optional" json:"gid" yaml:"gid"` Ino *float64 `field:"optional" json:"ino" yaml:"ino"` // FileType represents type of a file. Kind *string `field:"optional" json:"kind" yaml:"kind"` // Latency represents the latency to inject. Latency *string `field:"optional" json:"latency" yaml:"latency"` // Methods represents the method that the action will inject in. Methods *[]*string `field:"optional" json:"methods" yaml:"methods"` // MistakeSpec represents the mistake to inject. Mistake *PodIoChaosSpecActionsMistake `field:"optional" json:"mistake" yaml:"mistake"` // Timespec represents a time. Mtime *PodIoChaosSpecActionsMtime `field:"optional" json:"mtime" yaml:"mtime"` Nlink *float64 `field:"optional" json:"nlink" yaml:"nlink"` Perm *float64 `field:"optional" json:"perm" yaml:"perm"` Rdev *float64 `field:"optional" json:"rdev" yaml:"rdev"` Size *float64 `field:"optional" json:"size" yaml:"size"` // Source represents the source of current rules. Source *string `field:"optional" json:"source" yaml:"source"` Uid *float64 `field:"optional" json:"uid" yaml:"uid"` }
IOChaosAction defines an possible action of IOChaos.
type PodIoChaosSpecActionsAtime ¶
type PodIoChaosSpecActionsAtime struct { Nsec *float64 `field:"required" json:"nsec" yaml:"nsec"` Sec *float64 `field:"required" json:"sec" yaml:"sec"` }
Timespec represents a time.
type PodIoChaosSpecActionsCtime ¶
type PodIoChaosSpecActionsCtime struct { Nsec *float64 `field:"required" json:"nsec" yaml:"nsec"` Sec *float64 `field:"required" json:"sec" yaml:"sec"` }
Timespec represents a time.
type PodIoChaosSpecActionsFaults ¶
type PodIoChaosSpecActionsFaults struct { Errno *float64 `field:"required" json:"errno" yaml:"errno"` Weight *float64 `field:"required" json:"weight" yaml:"weight"` }
IoFault represents the fault to inject and their weight.
type PodIoChaosSpecActionsMistake ¶
type PodIoChaosSpecActionsMistake struct { // Filling determines what is filled in the miskate data. Filling PodIoChaosSpecActionsMistakeFilling `field:"optional" json:"filling" yaml:"filling"` // Max length of each wrong data segment in bytes. MaxLength *float64 `field:"optional" json:"maxLength" yaml:"maxLength"` // There will be [1, MaxOccurrences] segments of wrong data. MaxOccurrences *float64 `field:"optional" json:"maxOccurrences" yaml:"maxOccurrences"` }
MistakeSpec represents the mistake to inject.
type PodIoChaosSpecActionsMistakeFilling ¶
type PodIoChaosSpecActionsMistakeFilling string
Filling determines what is filled in the miskate data.
const ( // zero. PodIoChaosSpecActionsMistakeFilling_ZERO PodIoChaosSpecActionsMistakeFilling = "ZERO" // random. PodIoChaosSpecActionsMistakeFilling_RANDOM PodIoChaosSpecActionsMistakeFilling = "RANDOM" )
type PodIoChaosSpecActionsMtime ¶
type PodIoChaosSpecActionsMtime struct { Nsec *float64 `field:"required" json:"nsec" yaml:"nsec"` Sec *float64 `field:"required" json:"sec" yaml:"sec"` }
Timespec represents a time.