root

package
v0.11.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 53 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
	DefaultNodePingTimeout      = 1 * time.Second
	DefaultNodeCheckNetwork     = true
)

Defaults for root command options.

Variables

DefaultReflectorsTypes contains the default type of reflection for each reflected resource.

DefaultReflectorsWorkers contains the default number of workers for each reflected resource.

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
	RemoteKubeconfigSecretName string

	// Node name to use when creating a node in Kubernetes
	NodeName string
	// PodName to use when holding the virtual-kubelet lease
	PodName              string
	TenantNamespace      string
	LiqoNamespace        string
	InformerResyncPeriod time.Duration

	HomeCluster         argsutils.ClusterIDFlags
	ForeignCluster      argsutils.ClusterIDFlags
	DisableIPReflection bool
	LocalPodCIDR        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 for each refleted resource
	ReflectorsWorkers map[string]*uint

	// Type of reflection to use for each reflected resource
	ReflectorsType map[string]*string

	NodeLeaseDuration time.Duration
	NodePingInterval  time.Duration
	NodePingTimeout   time.Duration
	NodeCheckNetwork  bool

	NodeExtraAnnotations argsutils.StringMap
	NodeExtraLabels      argsutils.StringMap

	EnableAPIServerSupport          bool
	EnableStorage                   bool
	VirtualStorageClassName         string
	RemoteRealStorageClassName      string
	EnableIngress                   bool
	RemoteRealIngressClassName      string
	EnableLoadBalancer              bool
	RemoteRealLoadBalancerClassName string
	EnableMetrics                   bool
	MetricsAddress                  string

	HomeAPIServerHost string
	HomeAPIServerPort string

	CreateNode bool

	VirtualKubeletLeaseEnabled       bool
	VirtualKubeletLeaseLeaseDuration time.Duration
	VirtualKubeletLeaseRenewDeadline time.Duration
	VirtualKubeletLeaseRetryPeriod   time.Duration
}

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