Skip to content

feat: ork run <ref>, --apply-cr, --use-komposer, komposer.yaml in OCI artifacts#200

Merged
iAlexeze merged 6 commits into
mainfrom
feat/oci-run-pull
Jul 5, 2026
Merged

feat: ork run <ref>, --apply-cr, --use-komposer, komposer.yaml in OCI artifacts#200
iAlexeze merged 6 commits into
mainfrom
feat/oci-run-pull

Conversation

@iAlexeze

@iAlexeze iAlexeze commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

OCI-native ork run positional argument plus --apply-cr for the fully batteries-included experience. Completes the inspect → pull → run workflow without any local YAML files.

ork run <name>:<version>

ork run postgres:v1.0.0 pulls the pattern from the registry (if not cached) and starts the runtime — no -f flag, no local files needed.

ork run postgres:v1.0.0 --dev                   # pull → cluster → runtime
ork run postgres:v1.0.0 --dev --apply-cr        # + apply crd.yaml and cr.yaml
ork run postgres:v1.0.0 --dev --use-komposer    # run via komposer.yaml
ork run postgres:v1.0.0 --dev --refresh         # re-pull before running

Short names resolve against ORK_REGISTRY. Full oci:// refs are used as-is. Dev builds only — not exposed in the production runtime binary.

--apply-cr

Applies crd.yaml from the pattern directory, waits for the CRD to establish, then applies cr.yaml. The operator starts with a CR already waiting on its first reconcile cycle. Works with both OCI refs and local -f paths.

--use-komposer

Uses komposer.yaml from the pulled pattern instead of katalog.yaml. For OCI positional arg path only.

komposer.yaml included in pushed OCI artifacts

komposer.yaml was missing from the OptionalFiles list for Katalog patterns — it was never packaged as an OCI layer when pushing. Added FileKomposer constant to pkg/registry/constant.go and added it to the optional files list in pkg/registry/pattern.go. Existing patterns must be re-pushed to include it.

Docs

  • documentation/reference/cli/07-run.md — full rewrite documenting OCI positional arg and all new flags
  • documentation/getting-started/07-running-patterns.md — new page: full inspect → pull → run workflow

Test plan

  • ork run postgres:v1.0.0 — pulls pattern, starts runtime
  • ork run postgres:v1.0.0 --dev — creates kind cluster, starts runtime
  • ork run postgres:v1.0.0 --apply-cr — CRD applied, established, CR applied, runtime starts and reconciles
  • ork run postgres:v1.0.0 --use-komposer — runs via komposer.yaml
  • ork run postgres:v1.0.0 --refresh — re-pulls even when already cached
  • ork run ./local/katalog.yaml --apply-cr — applies crd.yaml and cr.yaml from the same directory
  • ork push postgres:v1.0.0 . — komposer.yaml now appears in push output and is included in OCI artifact
  • ork run postgres:v1.0.0 --use-komposer — uses the komposer.yaml from the newly pushed artifact

iAlexeze added 6 commits July 3, 2026 11:21
…callers

Replace the positional New(...) signature with New(e2eFile string, opts Options)
so adding future fields does not cascade changes across every call site.

Options struct fields: ClusterCtx, UseCurrentCtx, KeepCluster, Workers,
KindVersion, DevServer, OrkVersion, ValueFiles, HelmArgs.

--workers <n> accepted on ork e2e and ork push to provision worker nodes
alongside the control-plane in the kind cluster created for the run.
Workers and KindVersion propagate into sub-runner New calls for imports.
…ete cluster

ork create cluster --workers <n> provisions n kind worker nodes alongside
the control-plane. --version <v> selects the kind binary to download
(cached at ~/.orkestra/bin/kind-<version>); previously the version was
hardcoded to v0.27.0.

resolveKind: explicit --version now bypasses the PATH kind binary and uses
the versioned cache entry. An empty version still prefers PATH first, then
falls back to DefaultKindVersion.

waitForNodesReady: replaced the custom polling loop (which checked condition
type, not status, and could return "ready" with NotReady nodes) with
kubectl wait --for=condition=Ready node --all.

ork delete cluster --name <n> is the complement to ork create cluster;
backed by the existing DeleteKindCluster helper.
create.md: add --workers and --version flag entries, multi-node and
version-pin examples, node-ready behaviour note, pointer to delete.md.

08-e2e.md: add --workers flag.
09-push.md: add --workers flag for the e2e gate cluster.
delete.md: new page for ork delete cluster.
index.md: ork delete cluster entry in the Tooling table.
…example refactor

- leaderElection: on kubectl.delete resolves Lease holder and deletes the
  pod by name; replaces shell subcommand anti-pattern in e2e YAML
- leaderElection: on kubectl.exec runs a command inside the leader pod
- validate.go: leaderElection mutually exclusive with file/kind/name on
  delete; mutually exclusive with name/labelSelector on exec
- Rename E2EKubectlPortForwardLeaderElection → E2EKubectlLeaderElection;
  type is now shared by all four kubectl subcommands (YAML keys unchanged)
- include: composition for expect: — long expect sections can be split
  into an e2e/ subfolder and composed with include: entries
- Refactor all three resilience examples to use e2e/ subfolder includes:
  leader-failover (infra-ready, failover, cleanup)
  crd-missing-recovery (health-check, crd-loss, recovery, cleanup)
  admission-protection (degraded, recovery, cleanup)
- Fix: WaitForResource used .Run() for ready checks, letting kubectl
  rollout status and kubectl wait write to the terminal during spinner;
  replaced with .Output(). Same fix for helm repo add/update.
- Revamp documentation/concepts/e2e/04-best-practices.md
- Update 06-leader-led-deployments.md to cover delete and exec subcommands
- Update e2e/index.md description for leader-led-deployments entry
- CHANGELOG.md: v0.7.10 [UNRELEASED] entry
…aml in artifacts

- ork run <name>:<version> pulls the pattern from the registry (if not
  cached) and starts the runtime — no -f flag or local files required
- --apply-cr applies crd.yaml, waits for CRD established, applies cr.yaml
  before starting the runtime; works with OCI refs and local -f paths
- --use-komposer uses komposer.yaml from the pulled pattern instead of
  katalog.yaml; OCI positional arg path only
- --refresh re-pulls the pattern even if already cached
- IsOCIRef helper in pkg/registry/resolve.go distinguishes OCI refs from
  filesystem paths for the positional arg detection
- resolveOCIRunPath helper in cmd/cli/files.go handles pull + path resolution
- applyPatternExamples in run_dev_apply.go applies crd.yaml + cr.yaml from
  the pattern directory; distinct from katalog-declared crdFile/crFiles
- FileKomposer constant added to pkg/registry/constant.go
- komposer.yaml added to OptionalFiles for KatalogKind in pattern.go —
  it was never included as an OCI layer when pushing; re-push required
- documentation/reference/cli/07-run.md rewritten to cover OCI workflow
- documentation/getting-started/07-running-patterns.md new page: full
  inspect → pull → run walkthrough
- CHANGELOG.md: v0.7.10 [UNRELEASED] updated
@iAlexeze iAlexeze merged commit 3e4ff29 into main Jul 5, 2026
6 checks passed
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