root

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package root provides methods to build and start the virtual-kubelet.

Index

Constants

View Source
const (
	DefaultNodeName                               = "virtual-kubelet"
	DefaultInformerResyncPeriod                   = 1 * time.Minute
	DefaultLiqoInformerResyncPeriod time.Duration = 0
	DefaultMetricsAddr                            = ":10255"
	DefaultListenPort                             = 10250

	DefaultPodSyncWorkers       = 10
	DefaultServiceWorkers       = 3
	DefaultEndpointSliceWorkers = 10

	DefaultKubeletNamespace = "default"
	DefaultLiqoIpamServer   = consts.NetworkManagerServiceName
)

Defaults for root command options.

Variables

AcceptedCiphers is the list of accepted TLS ciphers, with known weak ciphers elided Note this list should be a moving target.

Functions

func InstallFlags

func InstallFlags(flags *pflag.FlagSet, c *Opts)

func NewCommand

func NewCommand(ctx context.Context, name string, c *Opts) *cobra.Command

NewCommand creates a new top-level command. This command is used to start the virtual-kubelet daemon.

func SetDefaultOpts

func SetDefaultOpts(c *Opts) error

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 {
	// Sets the port to listen for requests from the Kubernetes API server
	ListenPort int32

	// Node name to use when creating a node in Kubernetes
	NodeName string

	HomeKubeconfig string

	MetricsAddr string

	// Number of workers to use to handle pod notifications and resource reflection
	PodSyncWorkers       uint
	ServiceWorkers       uint
	EndpointSliceWorkers uint

	InformerResyncPeriod     time.Duration
	LiqoInformerResyncPeriod time.Duration

	// Startup Timeout is how long to wait for the kubelet to start
	StartupTimeout time.Duration

	ForeignClusterID string
	HomeClusterID    string
	KubeletNamespace string

	LiqoIpamServer string

	Profiling bool

	NodeExtraAnnotations argsutils.StringMap
	NodeExtraLabels      argsutils.StringMap
}

Opts stores all the options for configuring the root virtual-kubelet 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