executionmode

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package executionmode defines the immutable execution-plane identity shared by controllers and admission. A namespace belongs to exactly one mode.

Index

Constants

View Source
const NamespaceLabel = "orka.ai/controller-mode"

NamespaceLabel is the immutable namespace execution-mode claim.

Variables

This section is empty.

Functions

func DefaultBuiltInAgentContract

func DefaultBuiltInAgentContract(agent *corev1alpha1.Agent, mode Mode) error

DefaultBuiltInAgentContract stamps the installation's immutable harness contract on a built-in Agent runtime when the trusted producer omitted it. Explicit selectors are never rewritten, and an opposite-mode selector is rejected before the object reaches admission.

func ValidateNamespace

func ValidateNamespace(namespace *corev1.Namespace, mode Mode) error

ValidateNamespace verifies the namespace is permanently claimed by mode.

Types

type Mode

type Mode string

Mode identifies the only execution contract an installation may serve.

const (
	HarnessV1 Mode = "harness-v1"
	HarnessV2 Mode = "harness-v2"
)

func FromNamespace

func FromNamespace(namespace *corev1.Namespace) (Mode, error)

FromNamespace reads and validates a namespace's immutable mode claim.

func Parse

func Parse(raw string) (Mode, error)

Parse returns a supported, canonical mode.

func (Mode) ContractVersion

func (m Mode) ContractVersion() corev1alpha1.AgentRuntimeContractVersion

ContractVersion returns the only harness contract admitted by the mode.

Jump to

Keyboard shortcuts

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