Skip to content

feat(e2e): customOperator, wait: imports, ./... discovery, shared install#155

Merged
iAlexeze merged 7 commits into
mainfrom
cleanups/pre-v1-early-access
Jun 2, 2026
Merged

feat(e2e): customOperator, wait: imports, ./... discovery, shared install#155
iAlexeze merged 7 commits into
mainfrom
cleanups/pre-v1-early-access

Conversation

@iAlexeze
Copy link
Copy Markdown
Collaborator

@iAlexeze iAlexeze commented Jun 1, 2026

Summary

  • spec.customOperator: true — skip Orkestra bundle+install, use ork e2e as a test harness for any operator. Paired with setup.helm to install the operator under test. Validation shows mode indicator; spec.katalog is optional.
  • wait: on import declarations — sleep N before an import starts. Covers webhook deregistration, namespace termination, cert provisioning.
  • Shared Orkestra install across imports — runImports pre-installs once, each sub-runner syncs the bundle, coordinator uninstalls at the end. Eliminates per-import helm install/uninstall cycles (~3 min saved on a 5-import suite).
  • ork e2e ./... discovery — walks a directory, finds all *e2e.yaml leaf files, runs them as a suite. --wait injects wait between tests. --skip filters paths.
  • Suppress helm output — install/uninstall no longer bleeds raw Helm output to terminal. Captured output included in error on failure.
  • Fix WaitForResource for Deployments — was using kubectl wait --for=condition=Ready (no such condition); now uses kubectl rollout status.
  • Fix checkAll order — commands now run before resources so action commands execute before state is asserted.
  • Adds examples/use-cases/custom-operator/01-pure-custom (cert-manager, 3/3 ✓) and 02-side-by-side (AppCert parity via Orkestra vs direct cert-manager).
  • Schema docs: 04-imports.md (wait), 01-spec.md (customOperator), new 05-custom-operator.md page with use cases.

Test plan

  • make ork compiles clean
  • ork e2e --use-current passes on examples/use-cases/custom-operator/01-pure-custom — 3/3
  • ork e2e ./examples/beginner/... --use-current discovers 4 files, runs 4/4 with shared Orkestra
  • ork validate shows mode: custom operator and (wait: Xs) on imports with wait
  • ork e2e -f examples/use-cases/custom-operator/02-side-by-side/e2e-orkestra.yaml
  • ork e2e ./... --skip use-cases/custom-operator on full examples tree

iAlexeze added 7 commits June 1, 2026 23:37
InstallOrUpgradeOrkestra and HelmInstall now capture stdout/stderr instead
of piping to the terminal. On failure the captured output is included in the
returned error. On success only the single status line is printed.

WaitForResource used kubectl wait --for=condition=Ready for Deployments,
which never succeeds (Deployments have no Ready condition). Now uses
kubectl rollout status deployment/<name> instead.
…rators

Adds spec.customOperator: true to E2ESpec. When set, bundle generation,
Orkestra helm install, OCI pre-pull, and helm uninstall are all skipped.
Cluster setup, CRD apply, setup manifests, CR apply, assertions, and CRD
cleanup all run unchanged.

resolveSource() now allows specs with spec.cr but no spec.katalog when
customOperator is true. applyCRD guards against empty katalogFile.
isPureAggregator() correctly excludes customOperator specs with a CR.
checkAll() now runs commands before resources so action commands (e.g.
kubectl delete) execute before the resource state is checked.

ork validate shows 'mode: custom operator (Orkestra install skipped)' and
no longer requires spec.katalog when customOperator: true.
Adds wait: string to E2EImport. The runner sleeps that duration before
starting the import. Useful for webhook deregistration gaps, namespace
termination, or cert-manager cert provisioning after setup.helm.

Validated at load time with time.ParseDuration — bad values are caught
before the cluster starts. ork validate shows '(wait: Xs)' in the imports
list. Shorthand form (plain string) continues to work unchanged.
Adds recursive e2e discovery: ork e2e ./... walks the directory tree,
finds all *e2e.yaml files that are not pure aggregators (imports-only),
sorts them, builds a dynamic in-memory suite, and runs it.

  ork e2e ./...
  ork e2e ./examples/beginner/...
  ork e2e ./... --wait 2s          # inject wait between each test
  ork e2e ./... --skip vendor,testdata,external/07-vault

Pure aggregators are skipped to avoid double-running tests that are already
covered by their root suite. --skip accepts comma-separated path patterns
matched against the full file path.
04-imports.md: adds wait to the fields table and a 'When to use wait:'
section covering webhook deregistration, namespace termination, and
cert provisioning.

01-spec.md: notes that spec.katalog is optional when customOperator: true;
adds spec.customOperator field entry with link to new page.

05-custom-operator.md: new page — what it does, how to activate, what is
skipped, the setup.helm pattern, and four use cases (migration parity,
third-party operators, two-operator composition, universal test harness).
01-pure-custom: cert-manager installed via setup.helm. Applies a self-signed
Certificate CR, asserts the TLS Secret is created. customOperator: true —
no Orkestra bundle or install. 3/3 confirmed passing.

02-side-by-side: AppCert CRD tested two ways. Orkestra side wraps cert-manager
via customResources (ClusterIssuer + Certificate as children). Custom side
applies cert-manager resources directly via command assertions. Identical
assertions — when both pass, the two implementations are equivalent.

Root README and root e2e.yaml aggregator included.
@iAlexeze iAlexeze merged commit 4144c38 into main Jun 2, 2026
4 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