chaosmeshorg

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

chaos-meshorg

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPodNetworkChaos_Override

func NewPodNetworkChaos_Override(p PodNetworkChaos, scope constructs.Construct, id *string, props *PodNetworkChaosProps)

Defines a "PodNetworkChaos" API object.

func PodNetworkChaos_GVK

func PodNetworkChaos_GVK() *cdk8s.GroupVersionKind

func PodNetworkChaos_IsConstruct

func PodNetworkChaos_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 PodNetworkChaos_Manifest

func PodNetworkChaos_Manifest(props *PodNetworkChaosProps) interface{}

Renders a Kubernetes manifest for "PodNetworkChaos".

This can be used to inline resource manifests inside other objects (e.g. as templates).

func PodNetworkChaos_Of

func PodNetworkChaos_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 PodNetworkChaos

type PodNetworkChaos 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
}

PodNetworkChaos is the Schema for the PodNetworkChaos API.

func NewPodNetworkChaos

func NewPodNetworkChaos(scope constructs.Construct, id *string, props *PodNetworkChaosProps) PodNetworkChaos

Defines a "PodNetworkChaos" API object.

type PodNetworkChaosProps

type PodNetworkChaosProps struct {
	// Spec defines the behavior of a pod chaos experiment.
	Spec     *PodNetworkChaosSpec     `field:"required" json:"spec" yaml:"spec"`
	Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"`
}

PodNetworkChaos is the Schema for the PodNetworkChaos API.

type PodNetworkChaosSpec

type PodNetworkChaosSpec struct {
	// The ipset on the pod.
	Ipsets *[]*PodNetworkChaosSpecIpsets `field:"optional" json:"ipsets" yaml:"ipsets"`
	// The iptables rules on the pod.
	Iptables *[]*PodNetworkChaosSpecIptables `field:"optional" json:"iptables" yaml:"iptables"`
	// The tc rules on the pod.
	Tcs *[]*PodNetworkChaosSpecTcs `field:"optional" json:"tcs" yaml:"tcs"`
}

Spec defines the behavior of a pod chaos experiment.

type PodNetworkChaosSpecIpsets

type PodNetworkChaosSpecIpsets struct {
	// The contents of ipset.
	Cidrs *[]*string `field:"required" json:"cidrs" yaml:"cidrs"`
	// The name of ipset.
	Name   *string `field:"required" json:"name" yaml:"name"`
	Source *string `field:"required" json:"source" yaml:"source"`
}

RawIPSet represents an ipset on specific pod.

type PodNetworkChaosSpecIptables

type PodNetworkChaosSpecIptables struct {
	// The block direction of this iptables rule.
	Direction *string `field:"required" json:"direction" yaml:"direction"`
	// The name of iptables chain.
	Name   *string `field:"required" json:"name" yaml:"name"`
	Source *string `field:"required" json:"source" yaml:"source"`
	// The name of related ipset.
	Ipsets *[]*string `field:"optional" json:"ipsets" yaml:"ipsets"`
}

RawIptables represents the iptables rules on specific pod.

type PodNetworkChaosSpecTcs

type PodNetworkChaosSpecTcs struct {
	// The name and namespace of the source network chaos.
	Source *string `field:"required" json:"source" yaml:"source"`
	// The type of traffic control.
	Type *string `field:"required" json:"type" yaml:"type"`
	// Bandwidth represents the detail about bandwidth control action.
	Bandwidth *PodNetworkChaosSpecTcsBandwidth `field:"optional" json:"bandwidth" yaml:"bandwidth"`
	// Corrupt represents the detail about corrupt action.
	Corrupt *PodNetworkChaosSpecTcsCorrupt `field:"optional" json:"corrupt" yaml:"corrupt"`
	// Delay represents the detail about delay action.
	Delay *PodNetworkChaosSpecTcsDelay `field:"optional" json:"delay" yaml:"delay"`
	// DuplicateSpec represents the detail about loss action.
	Duplicate *PodNetworkChaosSpecTcsDuplicate `field:"optional" json:"duplicate" yaml:"duplicate"`
	// The name of target ipset.
	Ipset *string `field:"optional" json:"ipset" yaml:"ipset"`
	// Loss represents the detail about loss action.
	Loss *PodNetworkChaosSpecTcsLoss `field:"optional" json:"loss" yaml:"loss"`
}

RawTrafficControl represents the traffic control chaos on specific pod.

type PodNetworkChaosSpecTcsBandwidth

type PodNetworkChaosSpecTcsBandwidth struct {
	// Buffer is the maximum amount of bytes that tokens can be available for instantaneously.
	Buffer *float64 `field:"required" json:"buffer" yaml:"buffer"`
	// Limit is the number of bytes that can be queued waiting for tokens to become available.
	Limit *float64 `field:"required" json:"limit" yaml:"limit"`
	// Rate is the speed knob.
	//
	// Allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second.
	Rate *string `field:"required" json:"rate" yaml:"rate"`
	// 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.
	Minburst *float64 `field:"optional" json:"minburst" yaml:"minburst"`
	// 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.
	Peakrate *float64 `field:"optional" json:"peakrate" yaml:"peakrate"`
}

Bandwidth represents the detail about bandwidth control action.

type PodNetworkChaosSpecTcsCorrupt

type PodNetworkChaosSpecTcsCorrupt struct {
	Corrupt     *string `field:"required" json:"corrupt" yaml:"corrupt"`
	Correlation *string `field:"optional" json:"correlation" yaml:"correlation"`
}

Corrupt represents the detail about corrupt action.

type PodNetworkChaosSpecTcsDelay

type PodNetworkChaosSpecTcsDelay struct {
	Latency     *string `field:"required" json:"latency" yaml:"latency"`
	Correlation *string `field:"optional" json:"correlation" yaml:"correlation"`
	Jitter      *string `field:"optional" json:"jitter" yaml:"jitter"`
	// ReorderSpec defines details of packet reorder.
	Reorder *PodNetworkChaosSpecTcsDelayReorder `field:"optional" json:"reorder" yaml:"reorder"`
}

Delay represents the detail about delay action.

type PodNetworkChaosSpecTcsDelayReorder

type PodNetworkChaosSpecTcsDelayReorder struct {
	Gap         *float64 `field:"required" json:"gap" yaml:"gap"`
	Reorder     *string  `field:"required" json:"reorder" yaml:"reorder"`
	Correlation *string  `field:"optional" json:"correlation" yaml:"correlation"`
}

ReorderSpec defines details of packet reorder.

type PodNetworkChaosSpecTcsDuplicate

type PodNetworkChaosSpecTcsDuplicate struct {
	Duplicate   *string `field:"required" json:"duplicate" yaml:"duplicate"`
	Correlation *string `field:"optional" json:"correlation" yaml:"correlation"`
}

DuplicateSpec represents the detail about loss action.

type PodNetworkChaosSpecTcsLoss

type PodNetworkChaosSpecTcsLoss struct {
	Loss        *string `field:"required" json:"loss" yaml:"loss"`
	Correlation *string `field:"optional" json:"correlation" yaml:"correlation"`
}

Loss represents the detail about loss action.

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL