root

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 34 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 = 10 * time.Hour
	DefaultListenPort           = 10250
	DefaultMetricsAddress       = ":10255"

	DefaultPodWorkers                  = 10
	DefaultServiceWorkers              = 3
	DefaultEndpointSliceWorkers        = 10
	DefaultIngressWorkers              = 3
	DefaultConfigMapWorkers            = 3
	DefaultSecretWorkers               = 3
	DefaultPersistenVolumeClaimWorkers = 3

	DefaultNodePingTimeout = 1 * time.Second
)

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, o *Opts)

InstallFlags configures the virtual kubelet flags.

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 {
	HomeKubeconfig string

	// Node name to use when creating a node in Kubernetes
	NodeName             string
	TenantNamespace      string
	InformerResyncPeriod time.Duration

	HomeCluster    discoveryv1alpha1.ClusterIdentity
	ForeignCluster discoveryv1alpha1.ClusterIdentity
	LiqoIpamServer string

	// Sets the port to listen for requests from the Kubernetes API server
	ListenPort      uint16
	MetricsAddress  string
	EnableProfiling bool

	// Number of workers to use to handle pod notifications and resource reflection
	PodWorkers                   uint
	ServiceWorkers               uint
	EndpointSliceWorkers         uint
	IngressWorkers               uint
	ConfigMapWorkers             uint
	SecretWorkers                uint
	PersistentVolumeClaimWorkers uint

	NodeLeaseDuration time.Duration
	NodePingInterval  time.Duration
	NodePingTimeout   time.Duration

	NodeExtraAnnotations argsutils.StringMap
	NodeExtraLabels      argsutils.StringMap

	EnableAPIServerSupport     bool
	EnableStorage              bool
	VirtualStorageClassName    string
	RemoteRealStorageClassName string
}

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

func NewOpts added in v0.3.2

func NewOpts() *Opts

NewOpts returns an Opts struct with the default values set.

Jump to

Keyboard shortcuts

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