models.telemetry.models module

class models.telemetry.models.ChaosRunTelemetry(json_dict: any | None = None)

Bases: object

Root object for the Telemetry Collection

__init__(json_dict: any | None = None)
cloud_infrastructure: str = 'Unknown'

Cloud infrastructure (if available) of the target cluster

cloud_type: str = 'self-managed'

Cloud Type (if available) of the target cluster: self-managed, rosa, etc

cluster_version: str = 'Unknown'

K8s or OCP version

health_checks: list[HealthCheck] = None

Health checks of application endpoint

job_status: bool = True

Overall job status, will take all scenario’s exit status

kubernetes_objects_count: dict[str, int]

Dictionary containing the number of objects deployed in the cluster during the chaos run

major_version: float = 0.0

Major cluster version to group similar results

network_plugins: list[str]

Network plugins deployed in the target cluster

node_summary_infos: list[NodeInfo]

Summary of node Infos collected from the target cluster. It will report all the master and infra nodes and only one of the workers that usually are configured to have the same resources.

node_taints: list[Taint]

The list of node taints detected

run_uuid: str = ''

Run uuid generated by Krkn for the Run

scenarios: list[ScenarioTelemetry]

List of the scenarios performed during the chaos run

timestamp: str = ''

Current time stamp of run

to_json() str
total_node_count: int = 0

Number of all kind of nodes in the target cluster

class models.telemetry.models.ClusterEvent(k8s_json_dict: any | None = None, json_dict: any | None = None, k8s_obj: any | None = None)

Bases: object

Summary of cluster event more relevant fields

__init__(k8s_json_dict: any | None = None, json_dict: any | None = None, k8s_obj: any | None = None)
creation: str

Event creation date time

involved_object_kind: str

Kind of the object that triggered the event

involved_object_name: str

Name of the object that triggered the event

involved_object_namespace: str

Namespace of the object that triggered the event

message: str

Message associated to the event

name: str

Event name assigned by the cluster

namespace: str

Event namespace

reason: str

Reason of the event trigger

source_component: str

Cluster component that triggered the event

to_json() str
type: str

Event severity

class models.telemetry.models.HealthCheck(json_dict: dict | None = None)

Bases: object

Health checks Response for application endpoints

__init__(json_dict: dict | None = None)
duration: float

Denotes the time between start time and end time

end_timestamp: str

end time stamp of health check

start_timestamp: str

start time stamp of health check

status: bool

Status of application

status_code: str

Status code of application

url: str

URL of application endpoint

class models.telemetry.models.NodeInfo(json_dict: dict | None = None)

Bases: object

Cluster node telemetry infos

__init__(json_dict: dict | None = None)
architecture: str = ''

CPU Architecture

count: int = 1

number of nodes of this kind

instance_type: str = ''

Cloud instance type (if available)

kernel_version: str = ''

Node kernel version

kubelet_version: str = ''

Kubelet Version

nodes_type: str = ''

Node Type (worker/infra/master etc.)

os_version: str = ''

Operating system version

class models.telemetry.models.S3BucketObject(type: str, path: str, size: int, modified: str)

Bases: object

Class that represents an S3 bucket object provided by the telemetry webservice

__init__(type: str, path: str, size: int, modified: str) None
modified: str

if it’s a file represents the date when the file has been created/modified

path: str

the path or the filename wit

size: int

if it’s a file represents the file size

type: str

can be “folder” or “file”

class models.telemetry.models.ScenarioTelemetry(json_object: any | None = None)

Bases: object

Scenario Telemetry collection

__init__(json_object: any | None = None)
affected_nodes: list[AffectedNode]

Nodes affected by the chaos scenario

affected_pods: PodsStatus

Pods affected by the chaos scenario

cluster_events: list[ClusterEvent]

Cluster events collected during the chaos run

end_timestamp: float

Timestamp when the Krkn run ended

exit_status: int

Exit Status of the Scenario Run

parameters: any

scenario parameters

parameters_base64: str

Scenario configuration file base64 encoded

scenario: str

Scenario filename

scenario_type: str

Scenario type

set_cluster_events(events: list[ClusterEvent])

Sets the cluster events filtering them by the accepted reasons

Parameters:

events – a list of ClusterEvents

start_timestamp: float

Timestamp when the Krkn run started

to_json() str
class models.telemetry.models.Taint(json_dict: dict | None = None)

Bases: object

Cluster Node Taint details

__init__(json_dict: dict | None = None)
effect: str = ''

effect of the taint in the node

key: str = ''

Taint key

node_name: str = ''

node name

value: str = ''

Taint Value