root

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Overview

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

Index

Constants

View Source
const (
	// CertificateTypeKubelet -> the kubelet certificate is requested to be signed by kubernetes.io/kubelet-serving.
	CertificateTypeKubelet = "kubelet"
	// CertificateTypeAWS -> the kubelet certificate is requested to be signed by beta.eks.amazonaws.com/app-serving.
	CertificateTypeAWS = "aws"
	// CertificateTypeSelfSigned -> the kubelet certificate is self signed.
	CertificateTypeSelfSigned = "self-signed"
)
View Source
const (
	DefaultNodeName             = "virtual-kubelet"
	DefaultInformerResyncPeriod = 10 * time.Hour
	DefaultListenPort           = 10250

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

	DefaultNodePingTimeout = 1 * time.Second
)

Defaults for root command options.

Variables

This section is empty.

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 addresses to listen for requests from the Kubernetes API server
	NodeIP          string
	ListenPort      uint16
	CertificateType *argsutils.StringEnum
	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