package
0.0.0-20240905184220-0a5f9d4d9d01
Repository: https://github.com/datadog/chaos-controller.git
Documentation: pkg.go.dev
# Packages
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
# Functions
AdvancedSelectorsToRequirements converts a slice of LabelSelectorRequirements into a slice of Requirements and returns an error if any of those LabelSelectorRequirements are invalid.
No description provided by the author
No description provided by the author
GetChaosPods returns chaos pods owned by the given instance and having the given labels both instance and label set are optional but at least one must be provided.
No description provided by the author
GetIntOrPercentValueSafely has three return values.
No description provided by the author
IsNotifiableEvent this event can be broadcasted to our notifiers.
No description provided by the author
No description provided by the author
IsUpdateConflictError tells us if this error is of the forms: "Operation cannot be fulfilled on disruptions.chaos.datadoghq.com "chaos-network-drop": the object has been modified; please apply your changes to the latest version and try again" "Operation cannot be fulfilled on disruptions.chaos.datadoghq.com "name": StorageError: invalid object, Code: 4, Key: /registry/chaos.datadoghq.com/disruptions/namespace/name, ResourceVersion: 0, AdditionalErrorMsg: Precondition failed: UID in precondition: 3534199c-2597-443e-ae59-92e003310d64, UID in object meta:" Sadly this doesn't seem to be one of the errors checkable with a function from "k8s.io/apimachinery/pkg/api/errors" So we parse the error message directly.
NetworkDisruptionHostSpecFromString parses the given hosts to host specs The expected format for hosts is <host>;<port>;<protocol>;<flow>;<connState>.
NetworkDisruptionServiceSpecFromString parses the given services to service specs The expected format for services is <serviceName>;<serviceNamespace>.
No description provided by the author
ShouldSkipNodeFailureInjection returns true if we are attempting to inject a node failure that has already been injected for this given target If we're using staticTargeting, we should never re-select a target whose InjectionStatus is anything other than NotInjected, as we may be injecting into a pod that has been rescheduled onto a new node.
TargetedContainers returns a map of containers with containerName as a key and containerID in the format '<type>://<container_id>' as a value.
No description provided by the author
# Constants
APIVersion is exported for client-go purposes.
ChaosPodEvent only attached to a chaos pod.
No description provided by the author
DisruptionCronEvent only attached to the disruption cron.
DisruptionCronKind is the disruption cron kind.
DisruptionEvent only attached to the disruption.
DisruptionKind is the disruption kind.
ERROR represents the type of gRPC alteration where a response is spoofed with a gRPC error code.
Injection related events Warning events.
Complete list of events sent out by the controller.
No description provided by the author
Normal events.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
No description provided by the author
DisruptionCron related events.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Disruption related events Warning events.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
No description provided by the author
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Targeted nodes related Warning events.
Normal events.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Normal events.
Targeted pods related Warning events.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
Complete list of events sent out by the controller.
FlowEgress is the string representation of network disruptions applied to outgoing packets.
FlowIngress is the string representation of network disruptions applied to incoming packets.
GroupName is exported for client-go purposes.
No description provided by the author
No description provided by the author
MaxClusterThreshold is the float64 of 1.0, representing 100%.
MaxDiskPathCharacters is used to limit the number of characters due to the eBPF memory kernel limitation.
No description provided by the author
this limitation does not come from TC itself but from the net scheduler of the kernel.
MaxNamespaceThreshold is the float64 of 1.0, representing 100%.
No description provided by the author
No description provided by the author
No description provided by the author
OVERRIDE represents the type of gRPC alteration where a response is spoofed with a specified return value.
No description provided by the author
No description provided by the author
No description provided by the author
TargetEvent only attached to a target.
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
AddToScheme adds the types in this group-version to the given scheme.
ClientSchemeBuilder is exported for client-go purposes.
EmbeddedChaosAPI includes the library so it can be statically exported to chaosli
go:embed *.go.
ErrNoSpanContext is the error returned when the annotation does not contains expected span context key.
ErrNoUserInfo is the error returned when the annotation does not contains expected user info key.
ErrorMap is a mapping from string representation of gRPC error to the official error code.
No description provided by the author
GroupVersion is group version used to register these objects.
No description provided by the author
NoSideEffectDisruptions is the list of all disruption kinds where the lifecycle of the failure matches the lifecycle of the chaos pod.
SchemeBuilder is used to add go types to the GroupVersionKind scheme.
TypeMeta is the Disruption Type Meta to create a disruption.
# Structs
Config represents any configurable parameters for the safetynets, all of which have defaults.
ContainerFailureSpec represents a container failure injection.
CountTooLargeConfig represents the configuration for the countTooLarge safetynet +ddmark:validation:AtLeastOneOf={NamespaceThreshold,ClusterThreshold}.
CPUPressureSpec represents a cpu pressure disruption.
DiskFailureSpec represents a disk failure disruption.
DiskPressureSpec represents a disk pressure disruption.
DiskPressureThrottlingSpec represents a throttle on read and write disk operations.
Disruption is the Schema for the disruptions API +kubebuilder:resource:shortName=dis +kubebuilder:subresource:status +genclient +genclient:noStatus +genclient:onlyVerbs=create,get,list,delete,watch,update.
DisruptionCron is the Schema for the disruptioncron API +kubebuilder:resource:shortName=dicron +kubebuilder:subresource:status +genclient +genclient:noStatus +genclient:onlyVerbs=create,get,list,delete,watch,update.
DisruptionCronList contains a list of DisruptionCron.
DisruptionCronSpec defines the desired state of DisruptionCron.
DisruptionCronStatus defines the observed state of DisruptionCron.
No description provided by the author
No description provided by the author
DisruptionList contains a list of Disruption.
DisruptionPulse contains the active disruption duration and the dormant disruption duration +ddmark:validation:LinkedFields={ActiveDuration,DormantDuration}.
DisruptionRollout is the Schema for the disruptionrollout API +kubebuilder:resource:shortName=diroll +kubebuilder:subresource:status.
DisruptionRolloutList contains a list of DisruptionRollout.
DisruptionRolloutSpec defines the desired state of DisruptionRollout.
DisruptionRolloutStatus defines the observed state of DisruptionRollout.
DisruptionSpec defines the desired state of Disruption +ddmark:validation:ExclusiveFields={ContainerFailure,CPUPressure,DiskPressure,NodeFailure,Network,DNS,DiskFailure} +ddmark:validation:ExclusiveFields={NodeFailure,CPUPressure,DiskPressure,ContainerFailure,Network,DNS,DiskFailure} +ddmark:validation:LinkedFieldsValueWithTrigger={NodeFailure,Level} +ddmark:validation:AtLeastOneOf={DNS,CPUPressure,Network,NodeFailure,ContainerFailure,DiskPressure,GRPC,DiskFailure} +ddmark:validation:AtLeastOneOf={Selector,AdvancedSelector}.
DisruptionStatus defines the observed state of Disruption.
+ddmark:validation:ExclusiveFields={NotBefore,Offset}.
DisruptionTriggers holds the options for changing when injector pods are created, and the timing of when the injection occurs.
DNSRecord represents a type of DNS Record, such as A or CNAME, and the value of that record.
EndpointAlteration represents an endpoint to disrupt and the corresponding error to return +ddmark:validation:ExclusiveFields={ErrorToReturn,OverrideToReturn}.
No description provided by the author
GRPCDisruptionSpec represents a gRPC disruption.
HostRecordPair represents a hostname and a corresponding dns record override.
No description provided by the author
+ddmark:validation:AtLeastOneOf={AWSServiceList,GCPServiceList,DatadogServiceList}.
No description provided by the author
No description provided by the author
No description provided by the author
NetworkDisruptionSpec represents a network disruption injection +ddmark:validation:AtLeastOneOf={BandwidthLimit,Drop,Delay,Corrupt,Duplicate}.
NetworkHTTPFilters contains http filters.
NodeFailureSpec represents a node failure injection.
OpenatSyscallSpec syscall specs.
Reporting provides additional reporting options in order to send a message to a custom slack channel it expects the main controller to have the slack notifier enabled it expects a slack bot to be added to the defined slack channel.
No description provided by the author
TargetResourceSpec specifies the long-lived resource to be targeted for disruptions.
UnsafemodeSpec represents a spec with parameters to turn off specific safety nets designed to catch common traps or issues running a disruption All of these are turned off by default, so disabling safety nets requires manually changing these booleans to true.
# Type aliases
No description provided by the author
DNSDisruptionSpec represents a dns disruption.
No description provided by the author
EventReason is the string that identify an event.
No description provided by the author
No description provided by the author
No description provided by the author
TargetInjections is a map of target names to injectors.
No description provided by the author
No description provided by the author