...

Package podnetworkchaos

import "github.com/chaos-mesh/chaos-mesh/controllers/podnetworkchaos"
Overview
Index
Subdirectories

Overview ▾

func Bootstrap

func Bootstrap(mgr ctrl.Manager, client client.Client, logger logr.Logger, b *chaosdaemon.ChaosDaemonClientBuilder, recorderBuilder *recorder.RecorderBuilder) error

type NetemSpec

NetemSpec defines the interface to convert to a Netem protobuf

type NetemSpec interface {
    ToNetem() (*pb.Netem, error)
}

type Reconciler

Reconciler applys podnetworkchaos

type Reconciler struct {
    client.Client
    Recorder recorder.ChaosRecorder

    Log                      logr.Logger
    AllowHostNetworkTesting  bool
    ChaosDaemonClientBuilder *chaosdaemon.ChaosDaemonClientBuilder
}

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*Reconciler) SetIPSets

func (r *Reconciler) SetIPSets(ctx context.Context, pod *corev1.Pod, chaos *v1alpha1.PodNetworkChaos, chaosdaemonClient chaosdaemonclient.ChaosDaemonClientInterface) error

SetIPSets sets ipset on pod

func (*Reconciler) SetIptables

func (r *Reconciler) SetIptables(ctx context.Context, pod *corev1.Pod, chaos *v1alpha1.PodNetworkChaos, chaosdaemonClient chaosdaemonclient.ChaosDaemonClientInterface) error

SetIptables sets iptables on pod

func (*Reconciler) SetTcs

func (r *Reconciler) SetTcs(ctx context.Context, pod *corev1.Pod, chaos *v1alpha1.PodNetworkChaos, chaosdaemonClient chaosdaemonclient.ChaosDaemonClientInterface) error

SetTcs sets traffic control related chaos on pod

Subdirectories

Name Synopsis
..
ipset
iptable
netutils
tc