Documentation
¶
Index ¶
- Constants
- func AddPrefix(containerId string, runtime types.Runtime) string
- func NewContainerDiscovery(client types.Client) discovery_kit_sdk.TargetDiscovery
- func NewFillDiskContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[FillDiskActionState]
- func NewFillMemoryContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[FillMemoryActionState]
- func NewNetworkBlackholeContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
- func NewNetworkBlockDnsContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
- func NewNetworkCorruptPackagesContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
- func NewNetworkDNSErrorInjectionAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[DNSErrorInjectionState]
- func NewNetworkDelayContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
- func NewNetworkLimitBandwidthContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
- func NewNetworkPackageLossContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
- func NewNetworkTcpResetContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
- func NewPauseContainerAction(client types.Client) action_kit_sdk.Action[PauseActionState]
- func NewStopContainerAction(client types.Client) action_kit_sdk.Action[StopActionState]
- func NewStressCpuContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[StressActionState]
- func NewStressIoContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[StressActionState]
- func NewStressMemoryContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[StressActionState]
- func RemovePrefix(containerId string) string
- type ClaimResult
- type DNSErrorInjectionState
- type FillDiskActionState
- type FillMemoryActionState
- type Mode
- type NetworkActionState
- type PauseActionState
- type StopActionState
- type StressActionState
Constants ¶
View Source
const (
BaseActionID = "com.steadybit.extension_container"
)
Variables ¶
This section is empty.
Functions ¶
func NewContainerDiscovery ¶
func NewContainerDiscovery(client types.Client) discovery_kit_sdk.TargetDiscovery
func NewFillDiskContainerAction ¶
func NewFillDiskContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[FillDiskActionState]
func NewFillMemoryContainerAction ¶ added in v1.3.22
func NewFillMemoryContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[FillMemoryActionState]
func NewNetworkBlackholeContainerAction ¶
func NewNetworkBlackholeContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
func NewNetworkBlockDnsContainerAction ¶
func NewNetworkBlockDnsContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
func NewNetworkCorruptPackagesContainerAction ¶
func NewNetworkCorruptPackagesContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
func NewNetworkDNSErrorInjectionAction ¶ added in v1.6.0
func NewNetworkDNSErrorInjectionAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[DNSErrorInjectionState]
func NewNetworkDelayContainerAction ¶
func NewNetworkDelayContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
func NewNetworkLimitBandwidthContainerAction ¶
func NewNetworkLimitBandwidthContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
func NewNetworkPackageLossContainerAction ¶
func NewNetworkPackageLossContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
func NewNetworkTcpResetContainerAction ¶ added in v1.6.0
func NewNetworkTcpResetContainerAction(r ociruntime.OciRuntime, client types.Client) action_kit_sdk.Action[NetworkActionState]
func NewPauseContainerAction ¶
func NewPauseContainerAction(client types.Client) action_kit_sdk.Action[PauseActionState]
func NewStopContainerAction ¶
func NewStopContainerAction(client types.Client) action_kit_sdk.Action[StopActionState]
func NewStressCpuContainerAction ¶
func NewStressCpuContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[StressActionState]
func NewStressIoContainerAction ¶
func NewStressIoContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[StressActionState]
func NewStressMemoryContainerAction ¶
func NewStressMemoryContainerAction(r ociruntime.OciRuntime, c types.Client) action_kit_sdk.Action[StressActionState]
func RemovePrefix ¶
Types ¶
type ClaimResult ¶ added in v1.7.0
type ClaimResult int
ClaimResult is what claimNetnsForAttack tells Start to do.
const ( // ClaimPrimary is the first (or freshest, after full release) claim on // this netns. Start applies the attack. Stop must release the counter // exactly once via NetnsClaimed=true on state. ClaimPrimary ClaimResult = iota // ClaimShadow means a sibling container already claimed this netns // with IDENTICAL opts. Start skips apply. Stop skips revert. Release // counter exactly once via NetnsClaimed=true. ClaimShadow // ClaimPassthrough means a sibling claimed this netns with DIFFERENT // opts. Start proceeds normally (Apply is called). Netfault then decides // whether to accept as compatible or reject as conflicting. Stop reverts // normally. Passthrough does NOT touch the counter — NetnsClaimed=false // on state so Stop won't try to release. ClaimPassthrough )
type DNSErrorInjectionState ¶ added in v1.6.0
type FillDiskActionState ¶
type FillMemoryActionState ¶ added in v1.3.22
type FillMemoryActionState struct {
ExecutionId uuid.UUID
ContainerID string
TargetLabel string
TargetProcess ociruntime.LinuxProcessInfo
FillMemoryOpts memfill.Opts
IgnoreExitCodes []int
}
type NetworkActionState ¶
type NetworkActionState struct {
ExecutionId uuid.UUID
NetworkOpts json.RawMessage
Sidecar netfault.SidecarOpts
ContainerID string
TargetLabel string
// QdiscSnapshot holds the pre-attack qdisc tree captured by netfault.Apply.
// It travels through the action_kit_sdk per-execution state so Stop can
// hand it back to netfault.Revert and restore the original (cloud-tuned)
// root after the attack tree is torn down. Empty when strict-mode is on,
// the attack doesn't touch a tc root, or the capture itself errored.
QdiscSnapshot netfault.QdiscSnapshot
// IsShadow is true when this action's Start found another concurrent
// action already attacking the same netns WITH IDENTICAL OPTS
// (multi-container pods share a netns — see netns_dedup.go). Shadow
// actions do NOT install their own tc rules; only the first (primary)
// Start applies. Stop mirrors the same split: the primary reverts,
// shadows no-op. Different opts on a sibling take the passthrough
// branch instead of shadowing, so this stays false there. The flag
// lives on state so the primary/shadow decision survives an extension
// pod restart between Start and Stop.
IsShadow bool
// NetnsClaimed records whether Start incremented the netns tracker
// counter for this action. True for primary and shadow (both hold a
// claim). False for passthrough (netns was already claimed with
// different opts, so we didn't touch the tracker). Stop uses this to
// decide whether it owns a release — without it, an opts-decode or
// revert error inside Stop would leak the claim for the rest of the
// process's life and silently shadow every future Start on this netns.
NetnsClaimed bool
}
type PauseActionState ¶
type StopActionState ¶
Source Files
¶
- action_fill_disk.go
- action_fill_mem.go
- action_network.go
- action_network_bandwidth.go
- action_network_blackhole.go
- action_network_corrupt.go
- action_network_delay.go
- action_network_dns.go
- action_network_dns_error_injection.go
- action_network_loss.go
- action_network_tcp_reset.go
- action_pause.go
- action_stop.go
- action_stress.go
- action_stress_cpu.go
- action_stress_io.go
- action_stress_limit_helpers.go
- action_stress_memory.go
- common.go
- discovery.go
- discovery_utils.go
- netns_dedup.go
Click to show internal directories.
Click to hide internal directories.