flags

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package flags contains the flags used by the network commands.

Index

Constants

This section is empty.

Variables

NodePortNodesValues contains the possible values for NodePortNodes.

Functions

This section is empty.

Types

type FlagNames

type FlagNames string

FlagNames defines the names of the flags used by the network tests.

const (
	// FlagNamesProducersKubeconfigs is the flag name for the kubeconfigs of the remote clusters.
	FlagNamesProducersKubeconfigs FlagNames = "remote-kubeconfigs"
	// FlagNamesInfo is the flag name for the information output.
	FlagNamesInfo FlagNames = "info"
	// FlagNamesRemoveNamespace is the flag name for the namespace removal.
	FlagNamesRemoveNamespace FlagNames = "rm"
	// FlagNamesNodeportExternal is the flag that enables curl from external to nodeport service.
	FlagNamesNodeportExternal FlagNames = "np-ext"
	// FlagNamesNodeportNodes is the flag that selects nodes type for NodePort tests.
	FlagNamesNodeportNodes FlagNames = "np-nodes"
	// FlagNamesLoadbalancer is the flag that enables curl from external to loadbalancer service.
	FlagNamesLoadbalancer FlagNames = "lb"
	// FlagNamesBasic is the flag that runs only pod-to-pod checks.
	FlagNamesBasic FlagNames = "basic"
	// FlagNamesPodNodeport is the flag that enables curl from pod to nodeport service.
	FlagNamesPodNodeport FlagNames = "pod-np"
	// FlagNamesIP is the flag that enables IP remapping for the tests.
	FlagNamesIP FlagNames = "ip"
)

type NodePortNodes

type NodePortNodes string

NodePortNodes represents the type of nodes to target in NodePort tests.

const (
	// NodePortNodesAll represents the value to target all nodes.
	NodePortNodesAll NodePortNodes = "all"
	// NodePortNodesWorkers represents the value to target worker nodes.
	NodePortNodesWorkers NodePortNodes = "workers"
	// NodePortNodesControlPlanes represents the value to target control plane nodes.
	NodePortNodesControlPlanes NodePortNodes = "control-planes"
)

func (*NodePortNodes) Set

func (npn *NodePortNodes) Set(s string) error

Set sets the NodePortNodes value.

func (*NodePortNodes) String

func (npn *NodePortNodes) String() string

String returns the string representation of the NodePortNodes.

func (*NodePortNodes) Type

func (npn *NodePortNodes) Type() string

Type returns the enum type.

type Options

type Options struct {
	Topts *test.Options

	RemoteKubeconfigs []string
	Info              bool
	RemoveNamespace   bool

	// Basic
	Basic bool
	// Enable curl from external to nodeport service
	NodePortExt bool
	// Select nodes type for NodePort tests.
	// It has 2 possible values:
	// all: curl from all nodes
	// workers: curl from worker nodes
	NodePortNodes NodePortNodes
	// Enable curl from external to loadbalancer service
	LoadBalancer bool
	// PodToNodePort
	PodToNodePort bool
	// IpRemapping
	IPRemapping bool
}

Options contains the options for the network tests.

func NewOptions

func NewOptions(topts *test.Options) *Options

NewOptions returns a new Options struct.

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags adds the flags used by the network tests to the given flag set.

Jump to

Keyboard shortcuts

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