chaos

package
v0.0.0-...-f588f65 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

chaos is a utility package for injecting faults into running instances. Chaos Mesh takes awhile to apply the Chaos objects in which the backup could have already been completed. This can increase flakiness.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyChaosMeshPresent

func VerifyChaosMeshPresent(ctx context.Context, c runtimeClient.Client) error

Types

type ChaosObject

type ChaosObject interface {
	// CheckChaosActive checks whether the effect of the applied chaos is already active
	CheckChaosActive(ctx context.Context, c runtimeClient.Client) (bool, error)
	KubernetesObject() runtimeClient.Object
}

type PgChaosHelper

type PgChaosHelper interface {
	StopReplicas(ctx context.Context, c runtimeClient.Client) (ChaosObject, error)
	StopMaster(ctx context.Context, c runtimeClient.Client) (ChaosObject, error)
	PartitionMaster(ctx, c runtimeClient.Client, t []string) (ChaosObject, error)
}

type PgInjector

type PgInjector struct {
	Instance *postgresql.Postgresql
}

func (PgInjector) PartitionMaster

func (pg PgInjector) PartitionMaster(ctx context.Context, c runtimeClient.Client, t []string) (
	ChaosObject, error)

PartitionMaster applies NetworkChaos to isolate the master of the PostgreSQL instance.

func (PgInjector) StopMaster

func (pg PgInjector) StopMaster(ctx context.Context, c runtimeClient.Client) (ChaosObject,
	error)

StopMaster applies PodChaos causing the PostgreSQL instance's master to fail.

func (PgInjector) StopReplicas

func (pg PgInjector) StopReplicas(ctx context.Context, c runtimeClient.Client) (ChaosObject,
	error)

StopReplicas applies PodChaos causing the PostgreSQL instance's replicas to fail.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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