Package ipset

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

Overview ▾

func BuildIPSet

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

BuildIPSet builds an ipset with provided pod ip list

func FlushIPSets

func FlushIPSets(ctx context.Context, c client.Client, 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