Skip to content

feat(cli): ork create pattern — scaffold a complete operator suite#189

Merged
iAlexeze merged 5 commits into
mainfrom
feat/create-pattern-command
Jun 26, 2026
Merged

feat(cli): ork create pattern — scaffold a complete operator suite#189
iAlexeze merged 5 commits into
mainfrom
feat/create-pattern-command

Conversation

@iAlexeze

Copy link
Copy Markdown
Collaborator

What this does

ork create pattern generates the full file set to build, test, and publish an Orkestra operator. It surfaces the existing katalog scaffolding (ork generate katalog) and adds simulate.yaml and e2e.yaml — making the operator suite complete from the first command.

Files generated

Always:

  • katalog.yaml — operator declaration (same engine as ork generate katalog)
  • simulate.yaml — in-memory test starter (ork simulate)
  • e2e.yaml — real-cluster test starter (ork e2e)
  • README.md — numbered actionable steps from edit to release

Typed mode only (--add-hook, --add-constructor, --typed):

  • values.yaml — runtime image placeholder; e2e.yaml references this via valuesFiles so ork e2e passes the image to the Orkestra Helm chart
  • Makefileregistry, build, build-runtime, validate, simulate, e2e, docker, push, release, clean (no .txt workarounds from the example pack)
  • Dockerfile — distroless production image, runtime binary only

Usage

ork create pattern
ork create pattern -o ./my-operator/
ork create pattern --add-hook -o ./my-operator/
ork create pattern --typed

Docs

  • documentation/reference/cli/create.mdork create pattern reference section added
  • documentation/concepts/patterns/scaffold.md — new concept doc: what gets generated, dynamic vs typed, step-by-step flows, publishing
  • documentation/concepts/patterns/index.md — pages table wired in

iAlexeze added 5 commits June 26, 2026 05:07
Scaffolds a new Orkestra pattern directory with katalog.yaml,
simulate.yaml, e2e.yaml, and README.md in all modes. When any
typed flag is set (--typed, --add-hook, --add-constructor), also
writes a Makefile and Dockerfile suited for typed operator builds.

Also fixes KatalogScaffold to create the output directory when the
-o flag points to a non-existent path, and updates the katalog
template to nest hooks/constructor under operatorBox.reconciler.
Use file name constants throughout, match push/generate-registry output
style (successMark + dim), and hide the -f/--file persistent flag from
all create subcommands via createCmd.PersistentFlags().
Typed mode (--typed, --add-hook, --add-constructor) now also generates
values.yaml with a runtime.image placeholder. The e2e.yaml scaffold
includes valuesFiles: [./values.yaml] in typed mode so ork e2e can
pass the operator image to the Orkestra Helm chart.

README.md step order updated: release image -> set values.yaml -> e2e.
CLI reference and concepts/patterns/scaffold.md updated to match.
@iAlexeze iAlexeze merged commit 6b2ebec into main Jun 26, 2026
6 checks passed
@iAlexeze iAlexeze deleted the feat/create-pattern-command branch June 26, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant