models.krkn.models module

class models.krkn.models.ChaosRunAlert(alertname: str, alertstate: str, namespace: str, severity: str)

Bases: object

Represents a single alert collected from prometheus

__init__(alertname: str, alertstate: str, namespace: str, severity: str)
alertname: str

prometheus alert name

alertstate: str

prometheus alert state

namespace: str

namespace where the alert has been fired

severity: str

severity of the alert

class models.krkn.models.ChaosRunAlertSummary

Bases: object

Represents a summary of the collected alerts

__init__()
chaos_alerts: list[ChaosRunAlert]

alerts collected during the chaos

post_chaos_alerts: list[ChaosRunAlert]

alerts collected after the chaos run

run_id: str

Chaos run id

scenario: str

scenario that caused critical alerts

to_json() str
class models.krkn.models.ChaosRunOutput

Bases: object

The krkn full json output. this is meant to be injected into Elastic search to be indexed

__init__()
critical_alerts: ChaosRunAlertSummary | None

the prometheus critical alerts collected during and after the chaos run

telemetry: ChaosRunTelemetry | None

the cluster telemetry collected by krkn

to_json() str
class models.krkn.models.HogConfig

Bases: object

__init__()
cpu_load_percentage: int
cpu_method: str
duration: int
static from_yaml_dict(yaml_dict: dict[str, str]) HogConfig
image: str
io_block_size: str
io_target_pod_folder: str
io_target_pod_volume: dict[str, any]
io_write_bytes: str
memory_vm_bytes: str
namespace: str
node_selector: str
number_of_nodes: int | None
type: HogType
workers: int | None
class models.krkn.models.HogType(value)

Bases: str, Enum

An enumeration.

cpu = 'cpu'
io = 'io'
memory = 'memory'