root

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvKubeletAddress  = "VKUBELET_ADDRESS"
	EnvAPICertLocation = "APISERVER_CERT_LOCATION"
	EnvAPIKeyLocation  = "APISERVER_KEY_LOCATION"
)

Variables

View Source
var DefaultLogger = zap.New(zap.UseDevMode(true))

Functions

func AddAdmissionWebhooks

func AddAdmissionWebhooks(c Opts, virtualk8s *provider.VirtualK8S)

func GetUserHomeDir added in v0.1.2

func GetUserHomeDir() string

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

Types

type Opts

type Opts struct {
	DefaultHostEnvironment compute.HostEnvironment

	// KubeletAddress determines which address to tell API Server to use.
	// Node listens on all of its IP addresses on port 10250 and advertises the value specified in KubeletAddress to other nodes.
	KubeletAddress string

	// KubeletPorts determines the port to listen for requests from the Kubernetes API server.
	KubeletPort int32

	K8sAPICertFilepath string
	K8sAPIKeyFilepath  string

	// Namespace to watch for pods and other resources
	KubeNamespace string

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

	FSPollingInterval time.Duration

	// Number of workers to use to handle pod notifications
	PodSyncWorkers       int
	InformerResyncPeriod time.Duration

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

	DisableTaint bool
	TaintKey     string
	TaintValue   string
	TaintEffect  string
}

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