Title
feat(apply): phased banner and summary aligned with kubectl kustomize apply path
Proposed Target Output (example)
A) Default — final stage only (illustrative):
$ crane apply -t ./transform -o ./output
crane apply
transform-dir: /path/transform
output-dir: /path/output
mode: final stage only → 30_LastPlugin (example name)
[1/3] kubectl kustomize (stage 30_LastPlugin) … ok
[2/3] Writing bundle … /path/output/output.yaml
[3/3] Splitting multi-doc YAML into resource files … 42 resources
Summary
-------
output: /path/output/output.yaml
resources dir: /path/output/resources/ (per-namespace + _cluster as needed)
resources written: 42
duration: 48s
Done.
B) Multi-stage — e.g. --stages or --from-stage / --to-stage (illustrative; wording should match code):
$ crane apply -t ./transform -o ./output --stages 10_Foo,20_Bar
crane apply
transform-dir: /path/transform
output-dir: /path/output
mode: multi-stage (2 stage(s))
--- stage 10_Foo ---
[1/2] kubectl kustomize … ok
[2/2] Writing … /path/output/10_Foo.yaml
--- stage 20_Bar ---
[1/2] kubectl kustomize … ok
[2/2] Writing … /path/output/20_Bar.yaml
Summary
-------
stage bundles: 10_Foo.yaml, 20_Bar.yaml
duration: 1m 02s
Done.
Description
Context
crane apply is very quiet on success; users think the process froze. The implementation always runs kubectl kustomize on one or more stage directories under transform-dir, then writes YAML output (and for the default final-stage path, splits multi-doc YAML into per-resource files). It does not iterate merge operations per export file like crane transform. Approach here: opening banner, phased steps that match that pipeline (kustomize → write → split when applicable), and a closing Summary with paths, resource/document counts, and duration—for both default and multi-stage entry points.
User outcome
- Clear phases so the run does not look hung.
- Summary lists output location(s), approximate resource count (e.g. documents written in split step), and duration.
Scope
Acceptance criteria
Title
feat(apply): phased banner and summary aligned with kubectl kustomize apply pathProposed Target Output (example)
A) Default — final stage only (illustrative):
B) Multi-stage — e.g.
--stagesor--from-stage/--to-stage(illustrative; wording should match code):Description
Context
crane applyis very quiet on success; users think the process froze. The implementation always runskubectl kustomizeon one or more stage directories undertransform-dir, then writes YAML output (and for the default final-stage path, splits multi-doc YAML into per-resource files). It does not iterate merge operations per export file likecrane transform. Approach here: opening banner, phased steps that match that pipeline (kustomize → write → split when applicable), and a closing Summary with paths, resource/document counts, and duration—for both default and multi-stage entry points.User outcome
Scope
cmd/apply/apply.goand internal/apply/kustomize.go.Acceptance criteria
--debugwhere appropriate.