...

Package ipset

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

Overview ▾

func BuildIPSets

func BuildIPSets(pods []v1.Pod, externalCidrs []v1alpha1.CidrAndPort, networkchaos *v1alpha1.NetworkChaos, namePostFix string, source string) []v1alpha1.RawIPSet

BuildIPSets builds IP sets with provided pod ip list.

func BuildSetIPSet

func BuildSetIPSet(sets []v1alpha1.RawIPSet, networkchaos *v1alpha1.NetworkChaos, namePostFix string, source string) v1alpha1.RawIPSet

BuildSetIPSet builds list:set IP set that stores given sets

func FlushIPSets

func FlushIPSets(ctx context.Context, pbClient chaosdaemonclient.ChaosDaemonClientInterface, pod *v1.Pod, ipsets []*pb.IPSet) error

FlushIPSets makes grpc calls to chaosdaemon to save ipset

func GenerateIPSetName

func GenerateIPSetName(networkchaos *v1alpha1.NetworkChaos, namePostFix string) string

GenerateIPSetName generates name for ipset