cubelet

package
v0.0.0-...-3e0e934 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0, BSD-2-Clause Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInMemorySandboxControllers

func GetInMemorySandboxControllers(ic *plugin.InitContext) (map[string]sandbox.Controller, error)

func ReadyCondition

func ReadyCondition(
	nowFunc func() time.Time,
	runtimeErrorsFunc func() error,
	networkErrorsFunc func() error,
	storageErrorsFunc func() error,
	nodeShutdownManagerErrorsFunc func() error,
	recordEventFunc func(eventType, event string),
	localStorageCapacityIsolation bool,
) nodestatus.Setter

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(address string, opts ...ClientOpt) (*Client, error)

func NewFromFakeService

func NewFromFakeService(f *FakeService) *Client

func (*Client) CubeBoxService

func (c *Client) CubeBoxService() cubebox.CubeboxMgrServer

func (*Client) ImageService

func (c *Client) ImageService() images.ImagesServer

type ClientOpt

type ClientOpt func(c *clientOpts) error

func WithServices

func WithServices(opts ...ServicesOpt) ClientOpt

type Cubelet

type Cubelet struct {
	NodeHasSynced func() bool

	NodeRef *corev1.ObjectReference

	NodeLabels map[string]string

	SetNodeStatusFuncs []func(context.Context, *cubeletnodemeta.Node) error
	// contains filtered or unexported fields
}

func NewCubelet

func NewCubelet(
	mconfig *KubeletConfig,
	client *masterclient.Client,
	controllerMap map[string]controller.CubeMetaController,
	criImage *cubeimages.CubeImageService,
	rtManager runtemplate.RunTemplateManager,
	networkAgentClient networkagentclient.Client,
) (*Cubelet, error)

func (*Cubelet) Close

func (kl *Cubelet) Close() error

func (*Cubelet) GetNode

func (kl *Cubelet) GetNode() (*cubeletnodemeta.Node, error)

func (*Cubelet) Run

func (kl *Cubelet) Run(readyHook func()) error

type FakeService

type FakeService struct {
	CubeBoxes []*cubebox.CubeSandbox
	Images    sets.String
	cubebox.UnimplementedCubeboxMgrServer
	images.UnimplementedImagesServer

	ImageDeleteEvent []string
}

func (*FakeService) Create

func (*FakeService) CreateImage

func (*FakeService) DestroyImage

func (*FakeService) List

type KubeletConfig

type KubeletConfig struct {
	Insecurity     bool          `toml:"insecurity"`
	ResyncInterval time.Duration `toml:"resync_interval,omitempty"`

	DisableCreateNode bool `toml:"disable_create_node,omitempty"`

	NodeStatusUpdateFrequency tomlext.Duration `toml:"node_status_update_frequency,omitempty"`
}

func DefaultCubeletConfig

func DefaultCubeletConfig() *KubeletConfig

type ServicesOpt

type ServicesOpt func(c *services)

func WithCubeboxClient

func WithCubeboxClient(cubeboxSerivce cubebox.CubeboxMgrServer) ServicesOpt

func WithImageClient

func WithImageClient(imageService images.ImagesServer) ServicesOpt

func WithInMemoryService

func WithInMemoryService(ic *plugin.InitContext) ([]ServicesOpt, error)

Directories

Path Synopsis
Package resourcesource provides a late-bound registry for the cubelet's node-resource reporting pipeline.
Package resourcesource provides a late-bound registry for the cubelet's node-resource reporting pipeline.
Package versioninfo collects the real version of every component installed on a cubelet node and normalises them into a flat list for reporting to cubemaster on register / heartbeat.
Package versioninfo collects the real version of every component installed on a cubelet node and normalises them into a flat list for reporting to cubemaster on register / heartbeat.

Jump to

Keyboard shortcuts

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