pub struct ProcessSpec {
pub identity: IdentitySpec,
pub classification: Classification,
pub intent: Intent,
pub boundary: Boundary,
pub compliance: ComplianceSpec,
pub depends_on: Vec<DependsOn>,
pub signals: SignalPolicy,
pub lifetime: Lifetime,
pub routing: Option<RoutingSpec>,
pub encapsulates: Option<EncapsulatesSpec>,
pub suspended: bool,
}Expand description
Process — one element of the tatara convergence lattice, reconciled as a Unix process.
apiVersion: tatara.pleme.io/v1alpha1
kind: Process
metadata:
name: observability-stack
namespace: seph
spec:
identity:
parent: seph.1
classification:
pointType: Gate
substrate: Observability
intent:
nix:
flakeRef: github:pleme-io/k8s?dir=shared/infrastructure
attribute: observability
compliance:
baseline: fedramp-moderate
bindings:
- framework: nist-800-53
controlId: SC-7
phase: AtBoundary
dependsOn:
- name: secret-injectionFields§
§identity: IdentitySpecIdentity (parent, name override).
classification: ClassificationLattice position (6 dimensions).
intent: IntentWhere rendered artifacts come from. Exactly one variant must be set.
boundary: BoundaryBoundary predicates (preconditions / postconditions).
compliance: ComplianceSpecCompliance bindings + baseline.
depends_on: Vec<DependsOn>Lattice dependencies — must reach phase before we proceed.
signals: SignalPolicySignal policy (grace, SIGHUP strategy, start-suspended).
lifetime: LifetimeLifetime — Permanent (default, re-converging) or Ephemeral
(auto-SIGTERM per teardown_policy + TTL clock).
routing: Option<RoutingSpec>External edges — DNS + Ingress. When None, the Process is
internal-only (matches today’s default). See
crate::routing for the full shape.
encapsulates: Option<EncapsulatesSpec>Pre-existing in-cluster state this Process wraps. When None,
the Process is greenfield (Manage mode implicitly applied to
nothing pre-existing). See crate::encapsulates for the
three modes (Manage / Adopt / Observe).
suspended: boolSoft-suspend marker — reconciler treats as SIGSTOP. Same effect as delivering SIGSTOP, but persistent across restarts.
Implementations§
Source§impl ProcessSpec
impl ProcessSpec
Sourcepub fn gate_compute_defaults() -> Self
pub fn gate_compute_defaults() -> Self
Canonical minimum ProcessSpec — a Classification::gate_compute
classification with every other field parked at its Default —
the workspace-baseline spec every consumer that needed “a
ProcessSpec that just exists, with no domain-specific claim on
intent / boundary / lifetime / routing / encapsulates” hand-authored
as a 12-line struct-literal at scattered sites across the workspace.
The composition is the two-primitive product of
Classification::gate_compute (the two axes with no Default — a
Gate point on the Compute substrate) with the Default impl on
every other slot: IdentitySpec, Intent, Boundary,
ComplianceSpec, Vec<DependsOn>, SignalPolicy, Lifetime,
Option<RoutingSpec>, Option<EncapsulatesSpec>, bool. The 11
defaulted axes ride at the sibling closed-set + #[serde(default)]
defaults the CRD already owns; the two _or_default /
_or_placeholder corners on the metadata axis stay closed at the
substrate (Process::coordinates_or_defaults,
Process::name_or_placeholder) since this primitive builds the
spec half, not the metadata half.
Pre-lift the 12-line ProcessSpec { identity: <Default>, classification: Classification::gate_compute(), intent: <Default>, boundary: Default::default(), compliance: Default::default(), depends_on: vec![], signals: Default::default(), lifetime: Default::default(), routing: None, encapsulates: None, suspended: false } struct-literal recurred at EIGHT hand-authored sites past
the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold across four
crates, each restating the SAME 12-slot verbatim:
tatara-process::crd::tests::empty_spec— the substrate test fixture that pins everyProcess::*_or_*metadata-projection primitive on the (return-form × fallback-shape) axis;tatara-process::lib::tests::empty_process_spec(×2) — the sibling fixture inside thequalified_process_ref+DeletionTombstoned/Annotatedtrait pin modules;tatara-process::lib::tests(one inline site in thequalified_process_ref_composes_from_process_coordinates_or_defaultspin) — restated the SAME 12-line block inside the test body;tatara-reconciler::claim::tests::empty_process— the claim- arbiter row-builder pin fixture;tatara-pool-reconciler::controller_pool::tests(×3) — theempty_specfixture + two inlineprocess_to_member_state_*pin sites that hand-composed the same 12-slot spec inline.
Five more sites walked the SAME 12-slot shape but overrode ONE
field (intent, lifetime, or routing) inline and are lifted onto
the primitive via struct-update syntax
(..ProcessSpec::gate_compute_defaults()): the three
tatara-reconciler::render test-fixture helpers
(render_through_top_level_intent_dispatch, process_with,
demo_process) and the two tatara-process::lifetime_clock
helpers (ephemeral_process, permanent_process).
Post-lift each callsite reads ProcessSpec::gate_compute_defaults()
(or ProcessSpec { <slot>: <value>, ..ProcessSpec::gate_compute_defaults() } for the override sites);
a future workspace-wide baseline shift (a new #[serde(default)]
on a promoted Intent variant, a rename of a defaulted slot, a
per-baseline compliance overlay stamping through the spec) lands
at ONE substrate function here and every downstream consumer
inherits the upgrade mechanically. The current pin ties the
classification axis to the sibling Classification::gate_compute
primitive so a future change to that baseline surfaces at this
primitive’s tests rather than as silent drift across thirteen
independent callsites.
Sibling to Classification::gate_compute on the composition-
depth axis — that primitive owns the ONE-axis-slice construction
(the 5-slot Classification value); this primitive owns the
FULL-spec construction (the 11-slot ProcessSpec value that
wraps the classification-slice plus every other slot at
Default). A future peer ProcessSpec::observability_stack() or
similar named variant lands as a sibling method here when a
second unremarkable-baseline shape opens.
Theory anchor: THEORY.md §VI.1 (generation over composition — the
12-line struct-literal shape recurred at EIGHT hand-authored sites
past the ★★ PRIME-DIRECTIVE ≥ 2 duplication trigger and is lifted
onto ONE workspace-wide owner here). THEORY.md §II.1 invariant 5
(composition preserves proofs — a regression that drifted the
baseline axis choice at only one consumer, or that broke the
sibling-default correspondence with Classification::gate_compute,
surfaces at this primitive’s tests rather than as silent operator-
visible skew between the eight exact-match test-fixtures + the
five override sites whose struct-update composition depends on the
shape).
Trait Implementations§
Source§impl Clone for ProcessSpec
impl Clone for ProcessSpec
Source§fn clone(&self) -> ProcessSpec
fn clone(&self) -> ProcessSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProcessSpec
impl Debug for ProcessSpec
Source§impl<'de> Deserialize<'de> for ProcessSpec
impl<'de> Deserialize<'de> for ProcessSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<EphemeralSpec> for ProcessSpec
impl From<EphemeralSpec> for ProcessSpec
Source§fn from(e: EphemeralSpec) -> Self
fn from(e: EphemeralSpec) -> Self
Source§impl JsonSchema for ProcessSpec
impl JsonSchema for ProcessSpec
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl Serialize for ProcessSpec
impl Serialize for ProcessSpec
Source§impl TataraDomain for ProcessSpec
impl TataraDomain for ProcessSpec
Source§fn compile_from_args(args: &[Sexp]) -> Result<Self>
fn compile_from_args(args: &[Sexp]) -> Result<Self>
Auto Trait Implementations§
impl Freeze for ProcessSpec
impl RefUnwindSafe for ProcessSpec
impl Send for ProcessSpec
impl Sync for ProcessSpec
impl Unpin for ProcessSpec
impl UnsafeUnpin for ProcessSpec
impl UnwindSafe for ProcessSpec
Blanket Implementations§
impl<T> AppData for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
impl<T> AppDataResponse for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> OptionalSend for T
impl<T> OptionalSync for T
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);