control

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package control implements UID-bound control-plane fences for node workers. All reads used for authority must use an uncached APIReader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasStartupTaint

func HasStartupTaint(n *corev1.Node) bool

func IdentityMatches

func IdentityMatches(t api.Target, n *corev1.Node) bool

func ParseInventory

func ParseInventory(n *corev1.Node) (map[string]api.NodeRuntime, error)

func ReleaseClaim

func ReleaseClaim(ctx context.Context, c client.Client, r client.Reader, a Authority) error

ReleaseClaim uses a resourceVersion CAS and requires cleanup's durable Teardown checkpoint and complete worker teardown. A failed CAS must be retried by calling this function again, not by reusing the old Node.

func StartupFenced

func StartupFenced(n *corev1.Node) bool

func Withdraw

func Withdraw(ctx context.Context, c client.Client, r client.Reader, a Authority, keys []string) (bool, error)

Withdraw removes scheduling eligibility. If admission pins labels, only a successful write followed by an independent readback proves the fallback. A conflict/replacement never enters the fallback path with stale authority.

func WithdrawAdvertisement

func WithdrawAdvertisement(ctx context.Context, c client.Client, r client.Reader, a Authority, keys []string) (bool, error)

WithdrawAdvertisement is the controller's scheduling-only revocation path. Unlike host mutation authority, revocation must remain possible after a spec edit or deletion invalidates provisioning. It still requires a durable, claimed UID-bound target and never grants a worker host-write permission.

func WithdrawRetiredIdentity

func WithdrawRetiredIdentity(ctx context.Context, c client.Client, r client.Reader, name string, uid types.UID, identity RetiredIdentity, keys []string) (bool, error)

WithdrawRetiredIdentity removes scheduling eligibility only, including from unowned or foreign-claimed registrations of a retired physical host. It never modifies ownership or confers host cleanup authority.

func WorkersMayAuthorize

func WorkersMayAuthorize(ctx context.Context, r client.Reader, profileUID, nodeUID types.UID) (bool, error)

WorkersMayAuthorize is deliberately global and read-only. A legacy/malformed target set is unbounded authority, not evidence that the old host is excluded.

Types

type Authority

type Authority struct {
	NodeName    string
	NodeUID     types.UID
	ProfileName string
	ProfileUID  types.UID
	Generation  int64
	TargetUIDs  []types.UID
	Mode        string
}

type RetiredIdentity

type RetiredIdentity struct {
	ProfileName  string
	ProfileUID   types.UID
	Target       api.Target
	EvidenceName string
	EvidenceUID  types.UID
	ActiveLedger bool
}

type Snapshot

type Snapshot struct {
	Node    *corev1.Node
	Profile *api.NodeProfile
	Spec    api.NodeProfileSpec
	Target  api.Target
}

func Check

func Check(ctx context.Context, r client.Reader, a Authority) (*Snapshot, error)

Jump to

Keyboard shortcuts

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