feat(cli): ork create pattern — scaffold a complete operator suite#189
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
ork create patterngenerates the full file set to build, test, and publish an Orkestra operator. It surfaces the existing katalog scaffolding (ork generate katalog) and addssimulate.yamlande2e.yaml— making the operator suite complete from the first command.Files generated
Always:
katalog.yaml— operator declaration (same engine asork 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 releaseTyped mode only (
--add-hook,--add-constructor,--typed):values.yaml— runtime image placeholder;e2e.yamlreferences this viavaluesFilessoork e2epasses the image to the Orkestra Helm chartMakefile—registry,build,build-runtime,validate,simulate,e2e,docker,push,release,clean(no.txtworkarounds from the example pack)Dockerfile— distroless production image, runtime binary onlyUsage
Docs
documentation/reference/cli/create.md—ork create patternreference section addeddocumentation/concepts/patterns/scaffold.md— new concept doc: what gets generated, dynamic vs typed, step-by-step flows, publishingdocumentation/concepts/patterns/index.md— pages table wired in