cli

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExplainPolicies added in v0.2.0

func ExplainPolicies(explainedPolicies *matcher.Policy)

func Lint added in v0.2.1

func Lint(kubePolicies []*networkingv1.NetworkPolicy)

func ProbeSyntheticConnectivity added in v0.2.0

func ProbeSyntheticConnectivity(explainedPolicies *matcher.Policy, modelPath string)

func QueryTargets added in v0.2.0

func QueryTargets(explainedPolicies *matcher.Policy, podPath string)

func QueryTraffic added in v0.2.0

func QueryTraffic(explainedPolicies *matcher.Policy, trafficPath string)

func RunAnalyzeCommand added in v0.2.0

func RunAnalyzeCommand(args *AnalyzeArgs)

func RunCompareCommand added in v0.1.0

func RunCompareCommand(args *CompareArgs)

func RunGenerateCommand added in v0.0.10

func RunGenerateCommand(args *GenerateArgs)

func RunProbeCommand added in v0.0.7

func RunProbeCommand(args *ProbeArgs)

func RunRootCommand

func RunRootCommand()

func RunVersionCommand added in v0.1.2

func RunVersionCommand()

func SetupAnalyzeCommand added in v0.2.0

func SetupAnalyzeCommand() *cobra.Command

func SetupCompareCommand added in v0.1.0

func SetupCompareCommand() *cobra.Command

func SetupGenerateCommand added in v0.0.10

func SetupGenerateCommand() *cobra.Command

func SetupProbeCommand added in v0.0.6

func SetupProbeCommand() *cobra.Command

func SetupRootCommand added in v0.0.6

func SetupRootCommand() *cobra.Command

func SetupVersionCommand added in v0.1.2

func SetupVersionCommand() *cobra.Command

Types

type AnalyzeArgs added in v0.2.0

type AnalyzeArgs struct {
	AllNamespaces      bool
	Namespaces         []string
	UseExamplePolicies bool
	PolicyPath         string
	Context            string

	// explain
	Explain bool

	// lint
	Lint bool

	// traffic
	TrafficPath string

	// targets
	TargetPodPath string

	// synthetic probe
	ProbePath string
}

type CompareArgs added in v0.1.0

type CompareArgs struct {
	Noisy                     bool
	NetpolCreationWaitSeconds int
	Contexts                  []string
}

type GenerateArgs added in v0.0.10

type GenerateArgs struct {
	AllowDNS                  bool
	Noisy                     bool
	IgnoreLoopback            bool
	PerturbationWaitSeconds   int
	PodCreationTimeoutSeconds int
	Retries                   int
	BatchJobs                 bool
	Context                   string
	ServerPorts               []int
	ServerProtocols           []string
	ServerNamespaces          []string
	ServerPods                []string
	CleanupNamespaces         bool
	Include                   []string
	Exclude                   []string
}

type ProbeArgs added in v0.0.3

type ProbeArgs struct {
	Noisy                     bool
	IgnoreLoopback            bool
	KubeContext               string
	PerturbationWaitSeconds   int
	PodCreationTimeoutSeconds int
	PolicyPath                string

	// what to probe on
	ProbeAllAvailable bool
	Ports             []string
	Protocols         []string

	// server setup
	ServerProtocols  []string
	ServerPorts      []int
	ServerNamespaces []string
	ServerPods       []string
}

type QueryTargetPod

type QueryTargetPod struct {
	Namespace string
	Labels    map[string]string
}

QueryTargetPod matches targets; targets exist in only a single namespace and can't be matched by namespace

label, therefore we match by exact namespace and by pod labels.

type RootFlags added in v0.2.0

type RootFlags struct {
	Verbosity string
}

type SyntheticProbeConnectivityConfig added in v0.0.3

type SyntheticProbeConnectivityConfig struct {
	Resources *probe.Resources
	Probes    []*generator.PortProtocol
}

Jump to

Keyboard shortcuts

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