workload

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package workload builds dataplane workloads. The Unbounded operator deploys them; the controller only observes and authenticates them.

Index

Constants

View Source
const (
	DataplaneDaemonSetName  = "racer-dataplane"
	PodNetworkDaemonSetName = "racer-dataplane-podnet"
)
View Source
const DataplaneMemoryRequest = "1Gi"

DataplaneMemoryRequest is the default memory request for the dataplane container. It covers the fixed overhead (a checkpoint working set of up to 64 MiB by default, metadata, and runtime) plus the admission floors of a handful of I/O workers (roughly 115 MiB of byte budgets per worker), so the scheduler reserves a realistic baseline on every node.

Variables

This section is empty.

Functions

func DataplaneAffinity added in v0.17.0

func DataplaneAffinity() *corev1.Affinity

DataplaneAffinity is the default node affinity of dataplane Pods. Workloads that must share nodes with the dataplane reuse it.

func DesiredDaemonSets

func DesiredDaemonSets(c Config) ([]*appsv1.DaemonSet, error)

DesiredDaemonSets builds steady-state placement, not a safe migration plan. The operator must additionally exclude occupied destination nodes until every source Pod, including terminating Pods, has disappeared.

func ManagedNames

func ManagedNames(daemonSetName string) []string

ManagedNames contains only the explicitly configured workload.

Types

type Config

type Config struct {
	Cluster                 wire.ClusterID
	Namespace               string
	ControlURL              string
	BootstrapTrustConfigMap string
	DataplaneImage          string
	PeerPort                uint16
	HostNetwork             bool
	PodNetworkNodes         []string
	// Zero selects the automatic diagnostics port (9090, or 9091 when the peer
	// port is 9090).
	DiagnosticsPort         uint16
	DataplaneServiceAccount string
	DaemonSetName           string
}

Config contains only the inputs needed to build the dataplane DaemonSet. Controller limits, rotation policy, serving TLS, and durable state are independent.

func ConfigFromLookup

func ConfigFromLookup(lookup func(string) (string, bool)) (Config, error)

ConfigFromLookup reads operator deployment wiring without loading or validating controller runtime configuration. Shared settings retain the same defaults.

func (Config) Validate

func (c Config) Validate() error

type NodePlacement added in v0.17.0

type NodePlacement struct {
	// Affinity carries only node affinity. Pod affinity and anti-affinity
	// are relative to dataplane Pods, so a rule such as hostname
	// anti-affinity against racer-dataplane would otherwise exclude the
	// copying workload from every dataplane node.
	Affinity     *corev1.Affinity
	NodeSelector map[string]string
	Tolerations  []corev1.Toleration
}

NodePlacement holds the node-level scheduling constraints of a dataplane Pod. Workloads that must run on every node that serves a cache, such as cache origins, copy it so they follow the dataplane, including user overrides applied to the live DaemonSet.

func PlacementOf added in v0.17.0

func PlacementOf(pod *corev1.PodSpec) NodePlacement

PlacementOf returns a deep copy of the node-level scheduling constraints of a Pod spec.

Jump to

Keyboard shortcuts

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