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 ¶
- func VerifyChaosMeshPresent(ctx context.Context, c runtimeClient.Client) error
- type ChaosObject
- type PgChaosHelper
- type PgInjector
- func (pg PgInjector) PartitionMaster(ctx context.Context, c runtimeClient.Client, t []string) (ChaosObject, error)
- func (pg PgInjector) StopMaster(ctx context.Context, c runtimeClient.Client) (ChaosObject, error)
- func (pg PgInjector) StopReplicas(ctx context.Context, c runtimeClient.Client) (ChaosObject, error)
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.
Click to show internal directories.
Click to hide internal directories.