Skip to main content

owner_reference_json

Function owner_reference_json 

Source
pub fn owner_reference_json(name: &str, uid: &str) -> Value
Expand description

Build a Kubernetes OwnerReference JSON blob pointing at a Process (kind = PROCESS_KIND, apiVersion = api_version) with controller: true + blockOwnerDeletion: true — the exact 6-slot shape every SSA re-injection site pre-lift restated three times across tatara-reconciler (render.rs::owner_refs for export-Job owners, edges.rs::build_owner_refs for Ingress + DNSEndpoint owners, ssapply.rs::build_owner_reference for the injected owner-ref stamped on every applied DynamicObject). Callers with a live Process value read metadata.{name,uid} and pass them through as &str.

The 6-slot shape is fixed (controller + blockOwnerDeletion both true); a Process-owned resource that wants a non- controller reference doesn’t belong on this owner and can build its own json! inline — this primitive is the composer for the canonical “Process controls this resource, cascade-delete on GC” shape, not a general OwnerReference builder.