chaos

package module
v0.0.0-...-6beee48 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

README

chaos

Owner: dylan@helvellyn.io

Temporal Chaos Experiments

  • Project using the Temporal (https://www.temporal.io/) framework to enable chaos experiments on a component at any level of the OSI stack.

    • Targeted/random deleteion of pods (SAFE)
    • Corden/Drain node(s) (SAFE)
    • Targeting/ranom deletion of deployments (UNSAFE UNLESS USING OPERATORS)
    • Targeted/random deletion of nodes (UNSAFE WITHOUT CLUSTER AUTOSCALE)
    • Inject latency for gRPC/HTTPS response (SAFE)
BRANCH DETAILS: 

Master -

This project randomly deletes pods of a specified deployment. 
It uses the Temporal platform to run a singletask to delete a pod. 

Cron -

This project randomly deletes pods of a specified deployment. 
It uses the Temporal platform to run the task.
The schedule is determined via the CRON specifications.

Chaos Executions DB

Running Redis locally for the moment to store execution history.
Will look at using Temporal for this but not 100% its the right place 
atm. 

RUNNING: 
go run ./worker/main.go
go run ./start/main.go

TODO:
write tests.
redis integration to log chaos experiments.

Documentation

Index

Constants

View Source
const ChaosMonkey = "CHAOS_MONKEY_TASK_QUEUE"

Variables

This section is empty.

Functions

func DelPod

func DelPod(ctx context.Context, lastRunTime, thisRunTime time.Time) error

DoSomething is an Activity

func DeletePod

func DeletePod() (string, error)

Types

type CronResult

type CronResult struct {
	RunTime time.Time
}

CronResult is used to return data from one cron run to the next

func DelPodWorkflow

func DelPodWorkflow(ctx workflow.Context) (*CronResult, error)

SampleCronWorkflow executes on the given schedule The schedule is provided when starting the Workflow

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

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