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`
Click to show internal directories.
Click to hide internal directories.