Skip to main content

render

Function render 

Source
pub fn render(
    store: &LocalFsStore,
    registry: &EnvPackRegistry,
    flags: &OpFlags,
    args: EnvRenderArgs,
) -> Result<OpOutcome, OpError>
Expand description

op env render <env_id> [--kind <descriptor>] [--output <dir>] (plan §6 step 10). Renders the env’s declarative desired state through the deployer env-pack’s ManifestRenderer without applying anything — the artifact for direct-apply preview, GitOps repository handoff, or rendered-manifest handoff.

When the env’s Deployer-slot binding records wizard answers (answers_ref), the renderer consumes them so operator overrides (custom namespace, digest-pinned image, replica count) propagate into the rendered manifests. When no answers are recorded, sandbox defaults apply.

With --output <dir> each object is written as <NN>-<kind>-<name>.yaml in apply order. The output directory is render-managed for files matching the <NN>-*.yaml pattern (one or more leading digits followed by -): stale managed files from previous renders are removed so kubectl apply -f <dir> can never resurrect an archived revision. Other files (e.g. kustomization.yaml) are left untouched and reported in the outcome. Without --output the manifests are embedded in the JSON outcome.