commands

package
v0.0.0-...-89e5b94 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultInformerResyncPeriod = 1 * time.Minute
	DefaultKubeNamespace        = corev1.NamespaceDefault
)

Defaults for root command options

Variables

View Source
var (
	ReadyChan = make(chan struct{})
)

Functions

func RunRootCommand

func RunRootCommand(ctx context.Context, agentConfig *config.AgentConfig, kubeClient kubernetes.Interface) error

func SetDefaultOpts

func SetDefaultOpts(c *Opts)

SetDefaultOpts sets default options for unset values on the passed in option struct. Fields tht are already set will not be modified.

Types

type Opts

type Opts struct {
	// Namespace is used to watch for pods and other resources.
	Namespace string
	// NodeName is used when creating a node in Kubernetes.
	NodeName string
	// KeepNodeOnExit is used to identify whether information needs to be retained in k8s
	KeepNodeOnExit bool
	// AgentConfigFile is path of agent configuration file.
	AgentConfigFile string

	APIVersion   string
	AgentVersion string
}

Opts stores all the options for configuring the root command. It is used for setting flag values.

You can set the default options by creating a new `Opts` struct and passing it into `SetDefaultOpts`

Jump to

Keyboard shortcuts

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