Help us shape the future of Go! Take the 2026 Go Developer Survey

readiness

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Overview

Package readiness computes organisation readiness conditions (design §5.4, contracts.md "Readiness flow"). All functions are pure.

Index

Constants

View Source
const (
	SeatStorageReady = "StorageReady"
	SeatBackendValid = "BackendValid"
	SeatHarnessReady = "HarnessReady"
	// SeatAccessApplied is true when the seat runs the revision its access
	// profiles need (image tools, NetworkPolicy, proxy, browser).
	SeatAccessApplied = "AccessApplied"
	SeatReady         = "Ready"
)

Seat condition types on AgentSeat.

View Source
const (
	ProbePending = "pending"
	ProbePassed  = "passed"
	ProbeFailed  = "failed"
)

Probe states.

Variables

Order is the evaluation order of the conditions that OperationalReady requires; the first one that is not True names the blocking reason.

Functions

func Aggregate

func Aggregate(conds []metav1.Condition, gen int64) metav1.Condition

Aggregate computes OperationalReady from the other conditions. It is True only when every condition in Order is True for generation gen; otherwise the reason is the first blocking condition type and the message carries that condition's reason and message (which name the seat, binding or connection involved, A02).

func Condition

func Condition(t string, ok bool, reason, msg string, gen int64) metav1.Condition

Condition builds a condition for generation gen.

func ProbeCurrent

func ProbeCurrent(p *v1alpha1.SeatProbeStatus, revision, nonce string) bool

ProbeCurrent reports whether a seat probe answers the revision and nonce.

func SeatConditions

func SeatConditions(seats []SeatView, enforcement map[string]seatruntime.ProbeResult, gen int64) []metav1.Condition

SeatConditions derives StorageReady, HarnessCompatible, SandboxEnforced and RoutesExecutable from the seats and the per-profile enforcement probes.

func Unknown

func Unknown(t, reason, msg string, gen int64) metav1.Condition

Unknown builds an Unknown condition.

func VerifyConditions

func VerifyConditions(v *runtimeapi.VerifyResponse, required map[string]bool, gen int64) []metav1.Condition

VerifyConditions maps a platform verify response to the connection, ingress and binding conditions. Only required connections block readiness.

Types

type SeatView

type SeatView struct {
	Key            string
	SandboxProfile string
	ConfigRevision string
	// Nonce is the verify nonce the seat probe must answer ("" when none).
	Nonce  string
	Seat   *v1alpha1.AgentSeat // nil when not yet created
	Ensure error               // error while materialising the seat
}

SeatView is what the organisation needs to know about one seat.

Jump to

Keyboard shortcuts

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