testutil

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Overview

Package testutil provides external workload fixtures for controller tests. It is not imported by the controller or used to deploy workloads.

Index

Constants

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

Variables

This section is empty.

Functions

func DesiredDaemonSet

func DesiredDaemonSet(c Config) (*appsv1.DaemonSet, error)

DesiredDaemonSet declares the token audience, controller trust projection, node-private identity and slab storage, socket mounts, and exclusion affinity. It must never introduce a per-node Secret or trust a node-name as a Node UID. This fixture models an externally provisioned workload, never controller startup.

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 preserves the legacy automatic diagnostics port (9090, or 9091).
	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

Jump to

Keyboard shortcuts

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