ateomcapacity

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package ateomcapacity reports what an ateom can supply to the actors it hosts. Both ateoms answer GetCapacity from here so they answer it alike.

Index

Constants

View Source
const (
	CapacityMountPath = "/run/ateom-capacity"
	CPULimitFile      = "cpu_milli"
	MemoryLimitFile   = "memory_bytes"
)

Files the atecontroller projects into the ateom container from the downward API, in milli-cores and bytes.

Variables

This section is empty.

Functions

func FromFiles

FromFiles reads the ateom's compute limits from its downward API volume, as the report it sends to the node-local atelet.

A limit that is missing or unparseable is reported as zero, which the control plane reads as none: better to place nothing on a worker that cannot say what it has than to invent a number for it.

TODO: Watch the projected files and report changes. For now we do not support in-place Pod vertical scaling (IPPR); capacity is read once at startup. NOTE: Please do not implement this yet. IPPR needs more general consideration.

func Report

func Report(ctx context.Context, cfg ReportConfig) error

Report tells the node-local atelet what this ateom can supply, retrying until it is accepted or ctx ends.

Retrying is what makes a single report durable: atelet only accepts once the control plane has recorded it, and the Worker record may not exist yet when an ateom first comes up. Nothing else reports this, so giving up would leave the Worker holding no capacity and hosting nothing.

Types

type ReportConfig

type ReportConfig struct {
	SocketPath           string
	CredentialBundlePath string
	TrustBundlePath      string
}

ReportConfig is what an ateom needs to reach the atelet on its node.

Jump to

Keyboard shortcuts

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