runtime

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MPL-2.0 Imports: 85 Imported by: 0

Documentation

Overview

Package runtime provides the runtime implementation.

Index

Constants

View Source
const ImageCleanupInterval = 15 * time.Minute

ImageCleanupInterval is the interval at which the image GC controller runs.

View Source
const ImageGCGracePeriod = 4 * ImageCleanupInterval

ImageGCGracePeriod is the minimum age of an image before it can be deleted.

Variables

This section is empty.

Functions

func WaitForDevicesReady

func WaitForDevicesReady(ctx context.Context, r controller.Runtime, nextInputs []controller.Input) error

WaitForDevicesReady waits for devices to be ready.

It is a helper function for controllers.

Types

type CRIImageGCController

type CRIImageGCController struct {
	ImageServiceProvider func() (ImageServiceProvider, error)
	Clock                clock.Clock
	// contains filtered or unexported fields
}

CRIImageGCController renders manifests based on templates and config/secrets.

func (*CRIImageGCController) Inputs

func (ctrl *CRIImageGCController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*CRIImageGCController) Name

func (ctrl *CRIImageGCController) Name() string

Name implements controller.Controller interface.

func (*CRIImageGCController) Outputs

func (ctrl *CRIImageGCController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*CRIImageGCController) Run

Run implements controller.Controller interface.

type DevicesStatusController

type DevicesStatusController struct {
	V1Alpha1Mode machineruntime.Mode
}

DevicesStatusController loads extensions.yaml and updates DevicesStatus resources.

func (*DevicesStatusController) Inputs

func (ctrl *DevicesStatusController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*DevicesStatusController) Name

func (ctrl *DevicesStatusController) Name() string

Name implements controller.Controller interface.

func (*DevicesStatusController) Outputs

func (ctrl *DevicesStatusController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*DevicesStatusController) Run

Run implements controller.Controller interface.

type DropUpgradeFallbackController

type DropUpgradeFallbackController struct {
	MetaProvider MetaProvider
}

DropUpgradeFallbackController removes upgrade fallback key once machine reaches ready & running.

func (*DropUpgradeFallbackController) Inputs

Inputs implements controller.Controller interface.

func (*DropUpgradeFallbackController) Name

Name implements controller.Controller interface.

func (*DropUpgradeFallbackController) Outputs

Outputs implements controller.Controller interface.

func (*DropUpgradeFallbackController) Run

Run implements controller.Controller interface.

type EventsSinkConfigController

type EventsSinkConfigController struct {
	Cmdline      *procfs.Cmdline
	V1Alpha1Mode v1alpha1runtime.Mode
}

EventsSinkConfigController generates configuration for kmsg log delivery.

func (*EventsSinkConfigController) Inputs

func (ctrl *EventsSinkConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*EventsSinkConfigController) Name

func (ctrl *EventsSinkConfigController) Name() string

Name implements controller.Controller interface.

func (*EventsSinkConfigController) Outputs

func (ctrl *EventsSinkConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*EventsSinkConfigController) Run

func (ctrl *EventsSinkConfigController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) (err error)

Run implements controller.Controller interface.

type EventsSinkController

type EventsSinkController struct {
	V1Alpha1Events machinedruntime.Watcher
	Drainer        *machinedruntime.Drainer
	// contains filtered or unexported fields
}

EventsSinkController watches events and forwards them to the events sink server if it's configured.

func (*EventsSinkController) Inputs

func (ctrl *EventsSinkController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*EventsSinkController) Name

func (ctrl *EventsSinkController) Name() string

Name implements controller.Controller interface.

func (*EventsSinkController) Outputs

func (ctrl *EventsSinkController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*EventsSinkController) Run

Run implements controller.Controller interface.

type ExtensionServiceConfigController

type ExtensionServiceConfigController struct{}

ExtensionServiceConfigController watches v1alpha1.Config, creates/updates/deletes extension services config.

func (*ExtensionServiceConfigController) Inputs

Inputs implements controller.Controller interface.

func (*ExtensionServiceConfigController) Name

Name implements controller.Controller interface.

func (*ExtensionServiceConfigController) Outputs

Outputs implements controller.Controller interface.

func (*ExtensionServiceConfigController) Run

Run implements controller.Controller interface.

type ExtensionServiceConfigFilesController

type ExtensionServiceConfigFilesController struct {
	V1Alpha1Mode            v1alpha1runtime.Mode
	ExtensionsConfigBaseDir string
}

ExtensionServiceConfigFilesController writes down the config files for extension services.

func (*ExtensionServiceConfigFilesController) Inputs

Inputs implements controller.Controller interface.

func (*ExtensionServiceConfigFilesController) Name

Name implements controller.Controller interface.

func (*ExtensionServiceConfigFilesController) Outputs

Outputs implements controller.Controller interface.

func (*ExtensionServiceConfigFilesController) Run

Run implements controller.Controller interface.

type ExtensionServiceController

type ExtensionServiceController struct {
	V1Alpha1Services ServiceManager
	ConfigPath       string
	// contains filtered or unexported fields
}

ExtensionServiceController creates extension services based on the extension service configuration found in the rootfs.

func (*ExtensionServiceController) Inputs

func (ctrl *ExtensionServiceController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*ExtensionServiceController) Name

func (ctrl *ExtensionServiceController) Name() string

Name implements controller.Controller interface.

func (*ExtensionServiceController) Outputs

func (ctrl *ExtensionServiceController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*ExtensionServiceController) Run

Run implements controller.Controller interface.

type ExtensionStatusController

type ExtensionStatusController struct{}

ExtensionStatusController loads extensions.yaml and updates ExtensionStatus resources.

func (*ExtensionStatusController) Inputs

func (ctrl *ExtensionStatusController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*ExtensionStatusController) Name

func (ctrl *ExtensionStatusController) Name() string

Name implements controller.Controller interface.

func (*ExtensionStatusController) Outputs

func (ctrl *ExtensionStatusController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*ExtensionStatusController) Run

Run implements controller.Controller interface.

type ImageServiceProvider

type ImageServiceProvider interface {
	ImageService() images.Store
	Close() error
}

ImageServiceProvider wraps the containerd image service.

type KernelModuleConfigController

type KernelModuleConfigController struct{}

KernelModuleConfigController watches v1alpha1.Config, creates/updates/deletes kernel module specs.

func (*KernelModuleConfigController) Inputs

Inputs implements controller.Controller interface.

func (*KernelModuleConfigController) Name

func (ctrl *KernelModuleConfigController) Name() string

Name implements controller.Controller interface.

func (*KernelModuleConfigController) Outputs

Outputs implements controller.Controller interface.

func (*KernelModuleConfigController) Run

Run implements controller.Controller interface.

type KernelModuleSpecController

type KernelModuleSpecController struct {
	V1Alpha1Mode v1alpha1runtime.Mode
}

KernelModuleSpecController watches KernelModuleSpecs, sets/resets kernel params.

func (*KernelModuleSpecController) Inputs

func (ctrl *KernelModuleSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*KernelModuleSpecController) Name

func (ctrl *KernelModuleSpecController) Name() string

Name implements controller.Controller interface.

func (*KernelModuleSpecController) Outputs

func (ctrl *KernelModuleSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*KernelModuleSpecController) Run

Run implements controller.Controller interface.

type KernelParamConfigController

type KernelParamConfigController struct{}

KernelParamConfigController watches v1alpha1.Config, creates/updates/deletes kernel param specs.

func (*KernelParamConfigController) Inputs

func (ctrl *KernelParamConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*KernelParamConfigController) Name

func (ctrl *KernelParamConfigController) Name() string

Name implements controller.Controller interface.

func (*KernelParamConfigController) Outputs

func (ctrl *KernelParamConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*KernelParamConfigController) Run

Run implements controller.Controller interface.

type KernelParamDefaultsController

type KernelParamDefaultsController struct {
	V1Alpha1Mode v1alpha1runtime.Mode
}

KernelParamDefaultsController creates default kernel params.

func (*KernelParamDefaultsController) Inputs

Inputs implements controller.Controller interface.

func (*KernelParamDefaultsController) Name

Name implements controller.Controller interface.

func (*KernelParamDefaultsController) Outputs

Outputs implements controller.Controller interface.

func (*KernelParamDefaultsController) Run

Run implements controller.Controller interface.

type KernelParamSpecController

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

KernelParamSpecController watches KernelParamSpecs, sets/resets kernel params.

func (*KernelParamSpecController) Inputs

func (ctrl *KernelParamSpecController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*KernelParamSpecController) Name

func (ctrl *KernelParamSpecController) Name() string

Name implements controller.Controller interface.

func (*KernelParamSpecController) Outputs

func (ctrl *KernelParamSpecController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*KernelParamSpecController) Run

Run implements controller.Controller interface.

type KmsgLogConfigController

type KmsgLogConfigController struct {
	Cmdline *procfs.Cmdline
}

KmsgLogConfigController generates configuration for kmsg log delivery.

func (*KmsgLogConfigController) Inputs

func (ctrl *KmsgLogConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*KmsgLogConfigController) Name

func (ctrl *KmsgLogConfigController) Name() string

Name implements controller.Controller interface.

func (*KmsgLogConfigController) Outputs

func (ctrl *KmsgLogConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*KmsgLogConfigController) Run

func (ctrl *KmsgLogConfigController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) (err error)

Run implements controller.Controller interface.

type KmsgLogDeliveryController

type KmsgLogDeliveryController struct {
	Drainer *machinedruntime.Drainer
	// contains filtered or unexported fields
}

KmsgLogDeliveryController watches events and forwards them to the events sink server if it's configured.

func (*KmsgLogDeliveryController) Inputs

func (ctrl *KmsgLogDeliveryController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*KmsgLogDeliveryController) Name

func (ctrl *KmsgLogDeliveryController) Name() string

Name implements controller.Controller interface.

func (*KmsgLogDeliveryController) Outputs

func (ctrl *KmsgLogDeliveryController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*KmsgLogDeliveryController) Run

Run implements controller.Controller interface.

type MachineStatusController

type MachineStatusController struct {
	V1Alpha1Events v1alpha1runtime.Watcher
	// contains filtered or unexported fields
}

MachineStatusController watches MachineStatuss, sets/resets kernel params.

func (*MachineStatusController) Inputs

func (ctrl *MachineStatusController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*MachineStatusController) Name

func (ctrl *MachineStatusController) Name() string

Name implements controller.Controller interface.

func (*MachineStatusController) Outputs

func (ctrl *MachineStatusController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*MachineStatusController) Run

Run implements controller.Controller interface.

type MachineStatusPublisherController

type MachineStatusPublisherController struct {
	V1Alpha1Events v1alpha1runtime.Publisher
}

MachineStatusPublisherController watches MachineStatusPublishers, sets/resets kernel params.

func (*MachineStatusPublisherController) Inputs

Inputs implements controller.Controller interface.

func (*MachineStatusPublisherController) Name

Name implements controller.Controller interface.

func (*MachineStatusPublisherController) Outputs

Outputs implements controller.Controller interface.

func (*MachineStatusPublisherController) Run

Run implements controller.Controller interface.

type MaintenanceConfigController

type MaintenanceConfigController struct{}

MaintenanceConfigController manages Maintenance Service config: which address it should listen on, etc.

func (*MaintenanceConfigController) Inputs

func (ctrl *MaintenanceConfigController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*MaintenanceConfigController) Name

func (ctrl *MaintenanceConfigController) Name() string

Name implements controller.Controller interface.

func (*MaintenanceConfigController) Outputs

func (ctrl *MaintenanceConfigController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*MaintenanceConfigController) Run

Run implements controller.Controller interface.

type MaintenanceServiceController

type MaintenanceServiceController struct {
	SiderolinkPeerCheckFunc authz.SideroLinkPeerCheckFunc
}

MaintenanceServiceController runs the maintenance service based on the configuration.

func (*MaintenanceServiceController) Inputs

Inputs implements controller.Controller interface.

func (*MaintenanceServiceController) Name

func (ctrl *MaintenanceServiceController) Name() string

Name implements controller.Controller interface.

func (*MaintenanceServiceController) Outputs

Outputs implements controller.Controller interface.

func (*MaintenanceServiceController) Run

Run implements controller.Controller interface.

type MetaProvider

type MetaProvider interface {
	Meta() machineruntime.Meta
}

MetaProvider wraps acquiring meta.

type SecurityStateController

type SecurityStateController struct {
	V1Alpha1Mode machineruntime.Mode
}

SecurityStateController is a controller that updates the security state of Talos.

func (*SecurityStateController) Inputs

func (ctrl *SecurityStateController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*SecurityStateController) Name

func (ctrl *SecurityStateController) Name() string

Name implements controller.Controller interface.

func (*SecurityStateController) Outputs

func (ctrl *SecurityStateController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*SecurityStateController) Run

Run implements controller.Controller interface.

type ServiceManager

type ServiceManager interface {
	IsRunning(id string) (system.Service, bool, error)
	Load(services ...system.Service) []string
	Stop(ctx context.Context, serviceIDs ...string) (err error)
	Start(serviceIDs ...string) error
}

ServiceManager is the interface to the v1alpha1 services subsystems.

type UniqueMachineTokenController

type UniqueMachineTokenController = transform.Controller[*runtime.MetaLoaded, *runtime.UniqueMachineToken]

UniqueMachineTokenController provides a unique token the machine.

func NewUniqueMachineTokenController

func NewUniqueMachineTokenController() *UniqueMachineTokenController

NewUniqueMachineTokenController instanciates the controller.

type WatchdogTimerConfigController

type WatchdogTimerConfigController struct{}

WatchdogTimerConfigController generates configuration for watchdog timers.

func (*WatchdogTimerConfigController) Inputs

Inputs implements controller.Controller interface.

func (*WatchdogTimerConfigController) Name

Name implements controller.Controller interface.

func (*WatchdogTimerConfigController) Outputs

Outputs implements controller.Controller interface.

func (*WatchdogTimerConfigController) Run

Run implements controller.Controller interface.

type WatchdogTimerController

type WatchdogTimerController struct{}

WatchdogTimerController watches v1alpha1.Config, creates/updates/deletes kernel module specs.

func (*WatchdogTimerController) Inputs

func (ctrl *WatchdogTimerController) Inputs() []controller.Input

Inputs implements controller.Controller interface.

func (*WatchdogTimerController) Name

func (ctrl *WatchdogTimerController) Name() string

Name implements controller.Controller interface.

func (*WatchdogTimerController) Outputs

func (ctrl *WatchdogTimerController) Outputs() []controller.Output

Outputs implements controller.Controller interface.

func (*WatchdogTimerController) Run

Run implements controller.Controller interface.

Jump to

Keyboard shortcuts

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