Skip to content

feat(e2e): kind-based e2e cluster provisioner (hack/e2e) - #144

Merged
AviadHayumi merged 5 commits into
mainfrom
e2e-infra
Jul 15, 2026
Merged

AviadHayumi merged 5 commits into
mainfrom
e2e-infra

Conversation

@AviadHayumi

@AviadHayumi AviadHayumi commented Jul 6, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds hack/e2e: a standalone provisioner that stands up a local kind cluster, builds and deploys the Karta operator, and installs the upstream workload operators the e2e suite exercises (cert-manager, fake-gpu-operator, LeaderWorkerSet, JobSet, KubeRay, Kubeflow training-operator, Knative + Kourier, KServe, milvus, Grove + kai-scheduler, dynamo, k8s-nim-operator).

Each operator is its own standalone install.sh + verify.sh smoke test; versions are pinned in global.env; up.sh resolves dependencies (kserve pulls knative, dynamo pulls grove) and prints a per-operator install summary. Adds the Makefile e2e-up / e2e-up-<op> / e2e-down / lint-shell targets and a README.

up.sh builds the operator image from operator/Dockerfile and installs charts/karta, both already on main, so the provisioner runs end to end today: make e2e-up (or a subset, e.g. make e2e-up-jobset).

Provisioner only. The e2e test suite (test/e2e) and the GitHub Actions workflow land in a follow-up PR.

Related issue(s)

Relates to #138

Checklist

  • All commits are signed off with DCO (git commit -s)
  • New/modified files have SPDX license and copyright headers
  • Documentation updated (hack/e2e/README.md)
  • Tests pass (make check) - provisioner only; validated with make lint-shell and ./hack/e2e/up.sh --list
  • No proprietary or internal information included

Summary by CodeRabbit

  • New Features
    • Added local end-to-end cluster setup/teardown with operator smoke-test orchestration, including per-operator install shortcuts and an e2e-up-all option.
    • Added a deterministic CPU-based NIM test image and NIM operator e2e install + smoke verification.
  • Documentation
    • Documented the e2e workflow, operator selection, and per-operator onboarding steps.
  • Bug Fixes
    • Improved reliability via rollout readiness waits, retry handling for transient apply/warmup issues, and fail-fast smoke tests.
  • Chores
    • Added shell linting support for e2e scripts.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This PR adds e2e cluster orchestration under hack/e2e, per-operator install/verify smoke flows, a simulated NIM image, and Makefile targets to run, tear down, and lint the suite.

Changes

E2E cluster provisioning and operators

Layer / File(s) Summary
Make targets
Makefile
Adds CLUSTER_NAME, e2e up/down targets, operator convenience targets, shell script list, and shellcheck target.
E2E config and docs
hack/e2e/README.md, hack/e2e/global.env, hack/e2e/kind-config.yaml
Adds the e2e README, shared environment pins, and kind cluster config.
Shared operator helpers
hack/e2e/operators/_common.sh
Adds logging, retry, smoke test, image, and secret helper functions for operator scripts.
Cluster orchestration
hack/e2e/up.sh, hack/e2e/down.sh
Adds cluster provisioning, workload planning, operator execution, and teardown scripts.
JobSet, LWS, Kubeflow, and Knative
hack/e2e/operators/{jobset,lws,kubeflow,knative}/*
Adds install, smoke, and verification assets for JobSet, LWS, Kubeflow, and Knative.
KubeRay, KServe, Milvus, and Grove
hack/e2e/operators/{kuberay,kserve,milvus,grove}/*
Adds install, verify, smoke, and values files for KubeRay, KServe, Milvus, and Grove.
Dynamo operator
hack/e2e/operators/dynamo/*
Adds Dynamo installation, smoke manifest, and verification scripts.
NIM operator and simulated image
hack/e2e/operators/nim/*
Adds NIM installation, smoke, verification, and the simulated CPU NIM image build/runtime files.

Estimated code review effort: 4 (Complex) | ~60 minutes

Suggested reviewers: ronlv10

Poem

I hop through kind with whiskers bright,
And test each operator late at night.
From Grove to NIM, the suite now sings,
With smoke-test leaves and shellcheck springs.
A carrot toast for every run—
This e2e warren’s nearly done! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: a kind-based e2e cluster provisioner under hack/e2e.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch e2e-infra

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (8)
hack/e2e/operators/dynamo/smoke.yaml (1)

20-20: 📐 Maintainability & Code Quality | 🔵 Trivial

Image tag not tied to DYNAMO_VERSION.

install.sh pins the platform chart to ${DYNAMO_VERSION} from global.env, but this smoke manifest hardcodes dynamo-planner:1.2.1 as a separate literal. Bumping DYNAMO_VERSION won't update this file, risking version skew between the installed platform/operator and the smoke test image.

♻️ Suggested approach

Since smoke.yaml is static and applied directly via apply_with_retry/kubectl apply (see _common.sh run_smoke), consider templating the image tag and substituting ${DYNAMO_VERSION} before apply, e.g. in verify.sh:

-run_smoke "${MODULE_DIR}/smoke.yaml" "dynamographdeployment/dynamo-smoke" "jsonpath={.status.state}=successful" "300s" default
+envsubst < "${MODULE_DIR}/smoke.yaml" > "${tmp_manifest}"
+run_smoke "${tmp_manifest}" "dynamographdeployment/dynamo-smoke" "jsonpath={.status.state}=successful" "300s" default

and replace the literal tag with ${DYNAMO_VERSION} in smoke.yaml.

Also applies to: 29-29

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/operators/dynamo/smoke.yaml` at line 20, The smoke manifest is
hardcoding the dynamo-planner image tag instead of following DYNAMO_VERSION,
which can cause version skew with the installed platform. Update smoke.yaml to
use the version variable rather than a literal tag, and make sure the apply path
in verify.sh/_common.sh run_smoke substitutes DYNAMO_VERSION before kubectl
apply so the smoke image stays aligned with the operator version.
hack/e2e/operators/nim/image/Dockerfile (1)

4-44: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Run as non-root user.

Image runs as root with no USER directive. Trivy flags this (DS-0002). Even for a throwaway e2e image, add a non-root user since the operator will run this as a pod in the cluster.

🔒 Proposed fix
 # Copy the application code
 COPY nim_llm.py .
 
+# Run as a non-root user
+RUN useradd -m nimuser
+USER nimuser
+
 # Expose the ports
 EXPOSE 8000 8001
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/operators/nim/image/Dockerfile` around lines 4 - 44, The Dockerfile
currently builds and runs the NIM e2e image as root, so update it to use a
non-root account before the final CMD. Add a dedicated user/group after the app
files are copied and switch to that identity with USER, making sure the existing
build steps in the Dockerfile still work and the runtime can read the generated
nim_service_pb2 artifacts and nim_llm.py.

Source: Linters/SAST tools

hack/e2e/up.sh (2)

30-30: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Hardcoded default cluster name duplicated across files.

DEFAULT_CLUSTER="karta-e2e" here duplicates the same literal in global.env's CLUSTER_NAME default and in down.sh's own DEFAULT_CLUSTER. If the default ever changes in one place but not the others, the "is this a named/parallel cluster" branching (kubeconfig derivation) silently diverges between up.sh and down.sh.

Possible approach

Define the default once in global.env (e.g. DEFAULT_CLUSTER_NAME="karta-e2e") and reference it from both up.sh and down.sh instead of a locally hardcoded literal.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/up.sh` at line 30, The default cluster name is hardcoded in multiple
places, which can cause `up.sh` and `down.sh` to diverge if the value changes.
Move the shared default into `global.env` as a single source of truth (for
example, a `DEFAULT_CLUSTER_NAME` variable) and update the `DEFAULT_CLUSTER`
logic in `up.sh` and `down.sh` to reference that shared symbol instead of the
literal.

51-56: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

deps_of resolves only one dependency level.

Fine for the current graph (kserve->knative, dynamo->grove, both leaf deps), but if a future operator's dependency itself has a dependency, selected+=("$d") (lines 220-222) won't recursively expand it, silently omitting a needed operator from the plan.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/up.sh` around lines 51 - 56, The deps_of helper only returns direct
dependencies, so selected+=("$d") in the operator selection flow does not expand
transitive dependencies. Update deps_of and the dependency collection logic in
up.sh so dependency resolution is recursive/transitive for operator names like
kserve and dynamo, ensuring any dependency’s own dependencies are also added to
the plan without duplicates.
hack/e2e/README.md (1)

13-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a language to the fenced code block.

markdownlint flags this block (directory tree) as missing a language identifier.

Proposed fix
-```
+```text
 hack/e2e/
   up.sh                 orchestrator: base + selected operators (install then verify)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/README.md` around lines 13 - 26, The fenced directory-tree block in
the README is missing a language identifier and should be updated to use a plain
text fence. Modify the code block that documents the hack/e2e layout so it is
explicitly marked as text, keeping the existing tree content unchanged. Use the
README’s fenced block near the hack/e2e overview to make the markdownlint
warning go away.

Source: Linters/SAST tools

hack/e2e/operators/grove/smoke.yaml (1)

22-24: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider pinning the busybox image tag.

busybox:latest is used for the throwaway worker clique. Pinning to a digest or fixed tag would make the smoke test reproducible against registry drift, though the impact is low since this is an ephemeral test resource.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/operators/grove/smoke.yaml` around lines 22 - 24, The worker
container in the grove smoke test uses a floating busybox:latest tag, which can
drift and make the test nondeterministic. Update the worker spec in the
smoke.yaml manifest to use a pinned busybox image reference instead, ideally a
fixed tag or digest, so the throwaway worker clique remains reproducible across
runs.
hack/e2e/operators/knative/smoke.yaml (1)

7-26: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

Optional: pin helloworld-go to a digest for full reproducibility.

ghcr.io/knative/helloworld-go:latest matches Knative's own documented sample usage, but a :latest tag can still change under you during CI runs. Pinning to a digest would make the smoke test fully deterministic; not critical since this is the standard upstream sample image.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/operators/knative/smoke.yaml` around lines 7 - 26, The smoke test
uses ghcr.io/knative/helloworld-go:latest, which can vary between runs; update
the Knative Service manifest in smoke.yaml to pin the container image to a
specific digest for deterministic CI behavior. Keep the existing Service and
container setup intact, and only replace the mutable image reference with a
digest-pinned one so the smoke test remains stable.
hack/e2e/operators/jobset/install.sh (1)

12-16: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Retry the JobSet manifest apply hack/e2e/operators/jobset/install.sh:12-16

Use apply_with_retry here too so a brief GitHub/network failure doesn’t abort the bootstrap:

apply_with_retry "https://github.com/kubernetes-sigs/jobset/releases/download/${JOBSET_VERSION}/manifests.yaml" 5 10 --server-side
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/operators/jobset/install.sh` around lines 12 - 16, The JobSet
install flow in main() applies the upstream manifests directly, so a transient
GitHub/network failure can abort bootstrap. Replace the kubectl apply call with
apply_with_retry for the JobSet manifests URL, keeping the existing
--server-side behavior and the subsequent rollout_wait on
jobset-controller-manager unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hack/e2e/operators/kubeflow/install.sh`:
- Around line 13-17: The Kubeflow install flow in main() uses server-side apply
without forcing ownership, which can fail on reruns against an existing kind
cluster; update the kubectl apply invocation to match the other operator
installs by adding --force-conflicts alongside --server-side in the Kubeflow
training-operator setup.

In `@hack/e2e/operators/nim/image/requirements.txt`:
- Around line 4-12: Upgrade the FastAPI dependency in the requirements list to a
patched release that no longer pins Starlette to 0.27.x and is not affected by
the flagged FastAPI advisory. Keep the rest of the package set aligned with the
existing image requirements, and verify the lockstep dependencies used by the
Nim operator image still install cleanly after updating fastapi.

In `@Makefile`:
- Around line 88-98: The install targets for golangci-lint and
go-licence-detector only guard on binary presence, so a changed
GOLANGCI_LINT_VERSION or GO_LICENCE_DETECTOR_VERSION can reuse an outdated local
tool. Update the Makefile targets around the golangci-lint and
go-licence-detector install logic to make the guard version-aware by checking
the installed binary’s version against the pinned variable, or simplify by
reinstalling unconditionally; keep the existing target names and LOCALBIN-based
install flow intact.

---

Nitpick comments:
In `@hack/e2e/operators/dynamo/smoke.yaml`:
- Line 20: The smoke manifest is hardcoding the dynamo-planner image tag instead
of following DYNAMO_VERSION, which can cause version skew with the installed
platform. Update smoke.yaml to use the version variable rather than a literal
tag, and make sure the apply path in verify.sh/_common.sh run_smoke substitutes
DYNAMO_VERSION before kubectl apply so the smoke image stays aligned with the
operator version.

In `@hack/e2e/operators/grove/smoke.yaml`:
- Around line 22-24: The worker container in the grove smoke test uses a
floating busybox:latest tag, which can drift and make the test nondeterministic.
Update the worker spec in the smoke.yaml manifest to use a pinned busybox image
reference instead, ideally a fixed tag or digest, so the throwaway worker clique
remains reproducible across runs.

In `@hack/e2e/operators/jobset/install.sh`:
- Around line 12-16: The JobSet install flow in main() applies the upstream
manifests directly, so a transient GitHub/network failure can abort bootstrap.
Replace the kubectl apply call with apply_with_retry for the JobSet manifests
URL, keeping the existing --server-side behavior and the subsequent rollout_wait
on jobset-controller-manager unchanged.

In `@hack/e2e/operators/knative/smoke.yaml`:
- Around line 7-26: The smoke test uses ghcr.io/knative/helloworld-go:latest,
which can vary between runs; update the Knative Service manifest in smoke.yaml
to pin the container image to a specific digest for deterministic CI behavior.
Keep the existing Service and container setup intact, and only replace the
mutable image reference with a digest-pinned one so the smoke test remains
stable.

In `@hack/e2e/operators/nim/image/Dockerfile`:
- Around line 4-44: The Dockerfile currently builds and runs the NIM e2e image
as root, so update it to use a non-root account before the final CMD. Add a
dedicated user/group after the app files are copied and switch to that identity
with USER, making sure the existing build steps in the Dockerfile still work and
the runtime can read the generated nim_service_pb2 artifacts and nim_llm.py.

In `@hack/e2e/README.md`:
- Around line 13-26: The fenced directory-tree block in the README is missing a
language identifier and should be updated to use a plain text fence. Modify the
code block that documents the hack/e2e layout so it is explicitly marked as
text, keeping the existing tree content unchanged. Use the README’s fenced block
near the hack/e2e overview to make the markdownlint warning go away.

In `@hack/e2e/up.sh`:
- Line 30: The default cluster name is hardcoded in multiple places, which can
cause `up.sh` and `down.sh` to diverge if the value changes. Move the shared
default into `global.env` as a single source of truth (for example, a
`DEFAULT_CLUSTER_NAME` variable) and update the `DEFAULT_CLUSTER` logic in
`up.sh` and `down.sh` to reference that shared symbol instead of the literal.
- Around line 51-56: The deps_of helper only returns direct dependencies, so
selected+=("$d") in the operator selection flow does not expand transitive
dependencies. Update deps_of and the dependency collection logic in up.sh so
dependency resolution is recursive/transitive for operator names like kserve and
dynamo, ensuring any dependency’s own dependencies are also added to the plan
without duplicates.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 48ce98da-a853-470f-9f30-b0b70d45a107

📥 Commits

Reviewing files that changed from the base of the PR and between 0c04b28 and fa0ac26.

📒 Files selected for processing (44)
  • Makefile
  • hack/e2e/README.md
  • hack/e2e/down.sh
  • hack/e2e/global.env
  • hack/e2e/kind-config.yaml
  • hack/e2e/operators/_common.sh
  • hack/e2e/operators/dynamo/install.sh
  • hack/e2e/operators/dynamo/smoke.yaml
  • hack/e2e/operators/dynamo/verify.sh
  • hack/e2e/operators/grove/install.sh
  • hack/e2e/operators/grove/smoke.yaml
  • hack/e2e/operators/grove/values.yaml
  • hack/e2e/operators/grove/verify.sh
  • hack/e2e/operators/jobset/install.sh
  • hack/e2e/operators/jobset/smoke.yaml
  • hack/e2e/operators/jobset/verify.sh
  • hack/e2e/operators/knative/install.sh
  • hack/e2e/operators/knative/smoke.yaml
  • hack/e2e/operators/knative/verify.sh
  • hack/e2e/operators/kserve/disable-istio-vh.yaml
  • hack/e2e/operators/kserve/install.sh
  • hack/e2e/operators/kserve/smoke.yaml
  • hack/e2e/operators/kserve/verify.sh
  • hack/e2e/operators/kubeflow/install.sh
  • hack/e2e/operators/kubeflow/smoke.yaml
  • hack/e2e/operators/kubeflow/verify.sh
  • hack/e2e/operators/kuberay/install.sh
  • hack/e2e/operators/kuberay/smoke.yaml
  • hack/e2e/operators/kuberay/verify.sh
  • hack/e2e/operators/lws/install.sh
  • hack/e2e/operators/lws/smoke.yaml
  • hack/e2e/operators/lws/verify.sh
  • hack/e2e/operators/milvus/install.sh
  • hack/e2e/operators/milvus/smoke.yaml
  • hack/e2e/operators/milvus/verify.sh
  • hack/e2e/operators/nim/image/Dockerfile
  • hack/e2e/operators/nim/image/README.md
  • hack/e2e/operators/nim/image/nim_llm.py
  • hack/e2e/operators/nim/image/nim_service.proto
  • hack/e2e/operators/nim/image/requirements.txt
  • hack/e2e/operators/nim/install.sh
  • hack/e2e/operators/nim/smoke.yaml
  • hack/e2e/operators/nim/verify.sh
  • hack/e2e/up.sh

Comment thread hack/e2e/operators/kubeflow/install.sh Resolved
Comment thread Makefile
Comment on lines +88 to 98
curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(LOCALBIN) $(GOLANGCI_LINT_VERSION) ;\
}

.PHONY: go-licenses
go-licenses: $(GO_LICENSES) ## Download go-licenses locally if necessary.
$(GO_LICENSES): $(LOCALBIN)
@[ -f "$(GO_LICENSES)" ] || { \
.PHONY: go-licence-detector
go-licence-detector: $(GO_LICENCE_DETECTOR) ## Download go-licence-detector locally if necessary.
$(GO_LICENCE_DETECTOR): $(LOCALBIN)
@[ -f "$(GO_LICENCE_DETECTOR)" ] || { \
set -e; \
echo "Downloading go-licenses@$(GO_LICENSES_VERSION)" ;\
GOBIN=$(LOCALBIN) go install github.com/google/go-licenses/v2@$(GO_LICENSES_VERSION) ;\
echo "Downloading go-licence-detector@$(GO_LICENCE_DETECTOR_VERSION)" ;\
GOBIN=$(LOCALBIN) go install go.elastic.co/go-licence-detector@$(GO_LICENCE_DETECTOR_VERSION) ;\
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify tool version tags exist upstream.
echo "== golangci-lint releases (looking for v2.12.2) =="
gh api repos/golangci/golangci-lint/releases --paginate --jq '.[].tag_name' | grep -x 'v2.12.2' || echo "v2.12.2 NOT found"

echo "== go-licence-detector v0.10.0 =="
curl -sSf "https://proxy.golang.org/go.elastic.co/go-licence-detector/@v/v0.10.0.info" || echo "v0.10.0 NOT found on proxy"

Repository: run-ai/karta

Length of output: 448


Make the install guards version-aware
Makefile:88-98 currently only checks whether the binary exists, so changing GOLANGCI_LINT_VERSION or GO_LICENCE_DETECTOR_VERSION can leave an older local binary in place. Check the installed version or reinstall unconditionally so the pinned release is actually used.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` around lines 88 - 98, The install targets for golangci-lint and
go-licence-detector only guard on binary presence, so a changed
GOLANGCI_LINT_VERSION or GO_LICENCE_DETECTOR_VERSION can reuse an outdated local
tool. Update the Makefile targets around the golangci-lint and
go-licence-detector install logic to make the guard version-aware by checking
the installed binary’s version against the pinned variable, or simplify by
reinstalling unconditionally; keep the existing target names and LOCALBIN-based
install flow intact.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
hack/e2e/operators/nim/image/requirements.txt (1)

4-12: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

FastAPI/Starlette upgrade already requested; also address protobuf and h11.

The FastAPI 0.104.1 → Starlette 0.27.x chain was already flagged in a prior review round (host-header, multipart-DoS, UNC-path advisories). That still applies.

New from this pass: protobuf==4.25.1 carries a HIGH-severity DoS finding (GHSA-8qvm-5x2c-j2w7) that is patched in later 4.25.x/5.x releases — worth bumping. Separately, h11 isn't pinned directly here and the scan resolved a CRITICAL, very old 0.9.0 (GHSA-vqfr-h8mv-ghfj, fixed in 0.16.0); pin h11>=0.16.0 explicitly so it doesn't silently resolve to a stale transitive version.

🔧 Proposed fix
 fastapi==0.104.1
 uvicorn==0.24.0
 pydantic==2.5.0
 prometheus_client==0.19.0
 grpcio==1.59.3
 grpcio-tools==1.59.3
 grpcio-reflection==1.59.3
-protobuf==4.25.1
+protobuf>=4.25.8
+h11>=0.16.0
 requests==2.31.0

Since this drives a local test-only image, weigh the effort against the fact it's not internet-exposed, but the h11/protobuf pins are cheap to fix.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/operators/nim/image/requirements.txt` around lines 4 - 12, Update
the dependency pins in the requirements list to address the security findings:
bump protobuf from the vulnerable 4.25.1 release to a patched 4.25.x/5.x
version, and add an explicit h11 pin at 0.16.0 or newer so the image does not
resolve to the old transitive 0.9.0 build. Keep the existing FastAPI-related
dependency chain aligned with the previously requested Starlette-compatible
upgrade while making these pin changes in the same requirements file.
🧹 Nitpick comments (3)
Makefile (1)

176-178: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

lint-shell has no guard for a missing shellcheck binary.

Unlike golangci-lint/go-licence-detector, shellcheck isn't localbin-installed or version-pinned here, so a missing tool just fails with a raw "command not found" rather than a helpful message.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` around lines 176 - 178, The lint-shell target currently calls
shellcheck directly, so a missing binary fails with a raw error. Update the
Makefile’s lint-shell rule to follow the same pattern as the other lint targets
by adding a guard in the lint-shell recipe that checks for shellcheck before
invoking it and emits a clear install/help message if it is absent. Keep the
change scoped to the lint-shell target and preserve the existing use of
E2E_SHELL.
hack/e2e/README.md (1)

13-26: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add a language to the fenced code block.

markdownlint flags this block (layout diagram) for missing a language identifier (MD040). Use text since it's not shell code.

📝 Proposed fix
-```
+```text
 hack/e2e/
   up.sh                 orchestrator: base + selected operators (install then verify)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/README.md` around lines 13 - 26, The fenced layout diagram in the
README is missing a language identifier and should be marked as plain text to
satisfy markdownlint MD040. Update the markdown code fence in hack/e2e/README.md
to use text for the directory-tree block, keeping the existing content
unchanged.

Source: Linters/SAST tools

hack/e2e/operators/nim/image/Dockerfile (1)

1-45: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Container runs as root.

No USER directive is set, so the process runs as root inside the container. Since this is a throwaway simulated image only run inside the local kind e2e cluster the blast radius is limited, but adding a non-root user is a cheap hardening step.

🛡️ Proposed fix
 # Copy the application code
 COPY nim_llm.py .
 
+# Run as a non-root user
+RUN useradd --create-home --uid 1000 nim
+USER nim
+
 # Expose the ports
 EXPOSE 8000 8001
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/operators/nim/image/Dockerfile` around lines 1 - 45, The Dockerfile
for nim_llm runs the container as root because no USER is set. Add a dedicated
non-root user in this image build, ensure /app and generated gRPC artifacts are
owned or readable by that user, and switch to it before the final CMD in the
Dockerfile. Use the existing build steps around the WORKDIR, grpc_tools.protoc
generation, and nim_llm.py entrypoint to keep the app functional under the
non-root account.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@hack/e2e/operators/nim/image/requirements.txt`:
- Around line 4-12: Update the dependency pins in the requirements list to
address the security findings: bump protobuf from the vulnerable 4.25.1 release
to a patched 4.25.x/5.x version, and add an explicit h11 pin at 0.16.0 or newer
so the image does not resolve to the old transitive 0.9.0 build. Keep the
existing FastAPI-related dependency chain aligned with the previously requested
Starlette-compatible upgrade while making these pin changes in the same
requirements file.

---

Nitpick comments:
In `@hack/e2e/operators/nim/image/Dockerfile`:
- Around line 1-45: The Dockerfile for nim_llm runs the container as root
because no USER is set. Add a dedicated non-root user in this image build,
ensure /app and generated gRPC artifacts are owned or readable by that user, and
switch to it before the final CMD in the Dockerfile. Use the existing build
steps around the WORKDIR, grpc_tools.protoc generation, and nim_llm.py
entrypoint to keep the app functional under the non-root account.

In `@hack/e2e/README.md`:
- Around line 13-26: The fenced layout diagram in the README is missing a
language identifier and should be marked as plain text to satisfy markdownlint
MD040. Update the markdown code fence in hack/e2e/README.md to use text for the
directory-tree block, keeping the existing content unchanged.

In `@Makefile`:
- Around line 176-178: The lint-shell target currently calls shellcheck
directly, so a missing binary fails with a raw error. Update the Makefile’s
lint-shell rule to follow the same pattern as the other lint targets by adding a
guard in the lint-shell recipe that checks for shellcheck before invoking it and
emits a clear install/help message if it is absent. Keep the change scoped to
the lint-shell target and preserve the existing use of E2E_SHELL.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 74e9f449-1f17-400b-8b9c-d77b9a45ab00

📥 Commits

Reviewing files that changed from the base of the PR and between fa0ac26 and b9f0e00.

📒 Files selected for processing (44)
  • Makefile
  • hack/e2e/README.md
  • hack/e2e/down.sh
  • hack/e2e/global.env
  • hack/e2e/kind-config.yaml
  • hack/e2e/operators/_common.sh
  • hack/e2e/operators/dynamo/install.sh
  • hack/e2e/operators/dynamo/smoke.yaml
  • hack/e2e/operators/dynamo/verify.sh
  • hack/e2e/operators/grove/install.sh
  • hack/e2e/operators/grove/smoke.yaml
  • hack/e2e/operators/grove/values.yaml
  • hack/e2e/operators/grove/verify.sh
  • hack/e2e/operators/jobset/install.sh
  • hack/e2e/operators/jobset/smoke.yaml
  • hack/e2e/operators/jobset/verify.sh
  • hack/e2e/operators/knative/install.sh
  • hack/e2e/operators/knative/smoke.yaml
  • hack/e2e/operators/knative/verify.sh
  • hack/e2e/operators/kserve/disable-istio-vh.yaml
  • hack/e2e/operators/kserve/install.sh
  • hack/e2e/operators/kserve/smoke.yaml
  • hack/e2e/operators/kserve/verify.sh
  • hack/e2e/operators/kubeflow/install.sh
  • hack/e2e/operators/kubeflow/smoke.yaml
  • hack/e2e/operators/kubeflow/verify.sh
  • hack/e2e/operators/kuberay/install.sh
  • hack/e2e/operators/kuberay/smoke.yaml
  • hack/e2e/operators/kuberay/verify.sh
  • hack/e2e/operators/lws/install.sh
  • hack/e2e/operators/lws/smoke.yaml
  • hack/e2e/operators/lws/verify.sh
  • hack/e2e/operators/milvus/install.sh
  • hack/e2e/operators/milvus/smoke.yaml
  • hack/e2e/operators/milvus/verify.sh
  • hack/e2e/operators/nim/image/Dockerfile
  • hack/e2e/operators/nim/image/README.md
  • hack/e2e/operators/nim/image/nim_llm.py
  • hack/e2e/operators/nim/image/nim_service.proto
  • hack/e2e/operators/nim/image/requirements.txt
  • hack/e2e/operators/nim/install.sh
  • hack/e2e/operators/nim/smoke.yaml
  • hack/e2e/operators/nim/verify.sh
  • hack/e2e/up.sh
✅ Files skipped from review due to trivial changes (3)
  • hack/e2e/operators/kubeflow/smoke.yaml
  • hack/e2e/operators/nim/image/README.md
  • hack/e2e/operators/kserve/disable-istio-vh.yaml
🚧 Files skipped from review as they are similar to previous changes (34)
  • hack/e2e/operators/knative/smoke.yaml
  • hack/e2e/operators/jobset/verify.sh
  • hack/e2e/operators/kuberay/install.sh
  • hack/e2e/operators/lws/install.sh
  • hack/e2e/operators/grove/verify.sh
  • hack/e2e/operators/grove/values.yaml
  • hack/e2e/operators/lws/verify.sh
  • hack/e2e/operators/kuberay/verify.sh
  • hack/e2e/operators/milvus/verify.sh
  • hack/e2e/operators/milvus/smoke.yaml
  • hack/e2e/operators/kubeflow/install.sh
  • hack/e2e/operators/grove/smoke.yaml
  • hack/e2e/operators/jobset/install.sh
  • hack/e2e/operators/lws/smoke.yaml
  • hack/e2e/operators/knative/verify.sh
  • hack/e2e/operators/kserve/verify.sh
  • hack/e2e/operators/nim/smoke.yaml
  • hack/e2e/operators/kuberay/smoke.yaml
  • hack/e2e/down.sh
  • hack/e2e/operators/dynamo/install.sh
  • hack/e2e/operators/kubeflow/verify.sh
  • hack/e2e/operators/jobset/smoke.yaml
  • hack/e2e/operators/nim/verify.sh
  • hack/e2e/operators/nim/install.sh
  • hack/e2e/operators/milvus/install.sh
  • hack/e2e/kind-config.yaml
  • hack/e2e/operators/kserve/install.sh
  • hack/e2e/operators/kserve/smoke.yaml
  • hack/e2e/operators/knative/install.sh
  • hack/e2e/operators/_common.sh
  • hack/e2e/operators/grove/install.sh
  • hack/e2e/global.env
  • hack/e2e/operators/dynamo/verify.sh
  • hack/e2e/up.sh

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hack/e2e/operators/nim/image/main.go`:
- Line 44: The HTTP server in main and the srv initialization only set
ReadHeaderTimeout, so the server can still be held open by slow clients after
headers are read. Update the http.Server configuration for srv to also include
ReadTimeout, WriteTimeout, and IdleTimeout alongside ReadHeaderTimeout to harden
the handler setup while keeping the existing mux and addr wiring unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 75f5f5c5-ac0a-46ac-82c9-4ee39ab8d340

📥 Commits

Reviewing files that changed from the base of the PR and between b9f0e00 and 4fd9fb4.

📒 Files selected for processing (43)
  • Makefile
  • hack/e2e/README.md
  • hack/e2e/down.sh
  • hack/e2e/global.env
  • hack/e2e/kind-config.yaml
  • hack/e2e/operators/_common.sh
  • hack/e2e/operators/dynamo/install.sh
  • hack/e2e/operators/dynamo/smoke.yaml
  • hack/e2e/operators/dynamo/verify.sh
  • hack/e2e/operators/grove/install.sh
  • hack/e2e/operators/grove/smoke.yaml
  • hack/e2e/operators/grove/values.yaml
  • hack/e2e/operators/grove/verify.sh
  • hack/e2e/operators/jobset/install.sh
  • hack/e2e/operators/jobset/smoke.yaml
  • hack/e2e/operators/jobset/verify.sh
  • hack/e2e/operators/knative/install.sh
  • hack/e2e/operators/knative/smoke.yaml
  • hack/e2e/operators/knative/verify.sh
  • hack/e2e/operators/kserve/disable-istio-vh.yaml
  • hack/e2e/operators/kserve/install.sh
  • hack/e2e/operators/kserve/smoke.yaml
  • hack/e2e/operators/kserve/verify.sh
  • hack/e2e/operators/kubeflow/install.sh
  • hack/e2e/operators/kubeflow/smoke.yaml
  • hack/e2e/operators/kubeflow/verify.sh
  • hack/e2e/operators/kuberay/install.sh
  • hack/e2e/operators/kuberay/smoke.yaml
  • hack/e2e/operators/kuberay/verify.sh
  • hack/e2e/operators/lws/install.sh
  • hack/e2e/operators/lws/smoke.yaml
  • hack/e2e/operators/lws/verify.sh
  • hack/e2e/operators/milvus/install.sh
  • hack/e2e/operators/milvus/smoke.yaml
  • hack/e2e/operators/milvus/verify.sh
  • hack/e2e/operators/nim/image/Dockerfile
  • hack/e2e/operators/nim/image/README.md
  • hack/e2e/operators/nim/image/go.mod
  • hack/e2e/operators/nim/image/main.go
  • hack/e2e/operators/nim/install.sh
  • hack/e2e/operators/nim/smoke.yaml
  • hack/e2e/operators/nim/verify.sh
  • hack/e2e/up.sh
✅ Files skipped from review due to trivial changes (6)
  • hack/e2e/kind-config.yaml
  • hack/e2e/operators/grove/smoke.yaml
  • hack/e2e/operators/milvus/install.sh
  • hack/e2e/operators/nim/image/go.mod
  • hack/e2e/operators/nim/image/README.md
  • hack/e2e/global.env
🚧 Files skipped from review as they are similar to previous changes (33)
  • hack/e2e/operators/kuberay/smoke.yaml
  • hack/e2e/operators/jobset/smoke.yaml
  • hack/e2e/operators/lws/smoke.yaml
  • hack/e2e/operators/kuberay/verify.sh
  • hack/e2e/operators/milvus/smoke.yaml
  • hack/e2e/operators/grove/install.sh
  • hack/e2e/operators/lws/verify.sh
  • hack/e2e/operators/kserve/install.sh
  • hack/e2e/operators/jobset/verify.sh
  • hack/e2e/operators/knative/smoke.yaml
  • hack/e2e/operators/grove/values.yaml
  • hack/e2e/operators/nim/verify.sh
  • hack/e2e/operators/kserve/smoke.yaml
  • hack/e2e/operators/dynamo/smoke.yaml
  • hack/e2e/operators/nim/smoke.yaml
  • hack/e2e/operators/kserve/disable-istio-vh.yaml
  • hack/e2e/operators/dynamo/install.sh
  • hack/e2e/operators/knative/verify.sh
  • hack/e2e/operators/lws/install.sh
  • hack/e2e/operators/kubeflow/smoke.yaml
  • hack/e2e/operators/milvus/verify.sh
  • hack/e2e/operators/kserve/verify.sh
  • hack/e2e/operators/jobset/install.sh
  • hack/e2e/operators/nim/install.sh
  • hack/e2e/operators/knative/install.sh
  • hack/e2e/operators/kubeflow/install.sh
  • hack/e2e/operators/dynamo/verify.sh
  • hack/e2e/down.sh
  • hack/e2e/operators/grove/verify.sh
  • hack/e2e/operators/kubeflow/verify.sh
  • hack/e2e/operators/kuberay/install.sh
  • hack/e2e/operators/_common.sh
  • hack/e2e/up.sh

Comment thread hack/e2e/operators/nim/image/main.go Resolved

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth checking if we want to install MPI operator the same as we install it in runai.
we usually uninstall the bundled MPI operator in the kubeflow operator, and install updated version instead.
https://run-ai-docs.nvidia.com/self-hosted/2.22/getting-started/installation/bcm-install/deployment#distributed-training

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point , the training-operator ships the old MPIJob v1 bundled inside it
ive switched us to the standalone mpi-operator so we run v2beta1 (v2) workloads now - same operator we install in run:ai. i pinned the latest v0.8.2 (the run:ai guide says v0.6.0 or later).

@Isan-Rivkin Isan-Rivkin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this will be very valuable for us for sure!
Left comments, nothing major.

Comment thread hack/e2e/up.sh Outdated
install_karta() {
kubectl apply --server-side -f "${REPO_ROOT}/charts/karta/crds/"
helm upgrade -i karta "${REPO_ROOT}/charts/karta" -n karta-system --create-namespace \
--set image.repository="${IMAGE%%:*}" --set image.tag="${IMAGE##*:}" \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splitting IMAGE with ${IMAGE%%:*} corrupts valid references containing a registry port, so IMAGE=localhost:5000/karta:e2e deploys localhost:e2e instead of the image loaded into kind

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed - switched to ${IMAGE%:*} so it strips from the last colon, localhost:5000/karta:e2e keeps its tag now

# Uniform smoke test: apply the throwaway resource (retried past webhook warmup),
# wait for the stable state, then delete. <wait-expr> is passed to kubectl wait
# --for=, so it handles both "condition=Ready" and "jsonpath={.status.x}=y".
run_smoke() {

@Isan-Rivkin Isan-Rivkin Jul 8, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capture the wait result so the throwaway resource is always cleaned up, and so

apply_with_retry here is not using if/||rc= or something to catch error, so when all retries exhaust and it returns 1, set -e exits run_smoke before kubectl delete on line 117 below, no cleanup if it on the apply-failure path.

Please verify me on that, I'm pretty sure that's the case

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch , now i capture the apply result and only wait if it succeeded, and the delete always runs with --ignore-not-found - so the throwaway resource gets cleaned up even when the apply exhausts its retries

# so fetch it from the pinned upstream tag at install time instead of
# vendoring it. The tag tarball extracts to k8s-nim-operator-<version>/.
local src chart
src="$(mktemp -d)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no trap ... EXIT
A failed helm install exits before rm -rf "${src}" leaking the temp directory (dynamo/install.sh correctly uses a trap).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed - added trap 'rm -rf "${src}"' EXIT after the mktemp and made src not local so it resolves under set -u, same as dynamo. cleans up now even if curl/tar/helm install fails

Comment thread hack/e2e/up.sh

install_fake_gpu() {
kubectl label node "${CLUSTER_NAME}-worker" run.ai/simulated-gpu-node-pool=default --overwrite
helm upgrade -i fake-gpu-operator oci://ghcr.io/run-ai/fake-gpu-operator/fake-gpu-operator \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add --wait?
IIUC subsequent steps that need the fake GPU node label may race a not-yet-ready operator

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep , added --wait so the steps after it dont race a not-ready operator

Comment thread hack/e2e/operators/grove/smoke.yaml Outdated
podSpec:
containers:
- name: worker
image: busybox:latest

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all other use 1.36 let's be consistent, in this case I vote for pinned version NOT latest

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done , pinned it to busybox:1.36 like the rest

Comment thread hack/e2e/operators/kuberay/smoke.yaml Outdated
name: ray-smoke
namespace: default
spec:
rayVersion: "2.40.0"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use RAY_VERSION ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

# apply_with_retry <file-or-url> [tries] [sleep_secs] [extra kubectl apply args...]
# kubectl apply, retried while a validating webhook is still warming up. The apply
# runs inside an if so set -e does not abort on an expected transient failure.
apply_with_retry() {

@Isan-Rivkin Isan-Rivkin Jul 8, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The positional optional args (tries, sleep_secs) are consumed by position before "$@" extra-kubectl-flags.
A caller passing flags without numeric args (e.g. apply_with_retry url --server-side) silently sets tries=--server-side, which breaks seq 1 --server-side at runtime

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can pass flags straight through (apply_with_retry --server-side) and tries stays at the default

Comment thread hack/e2e/up.sh Resolved
Comment thread hack/e2e/up.sh Resolved
Comment thread hack/e2e/operators/nim/install.sh Outdated
src="$(mktemp -d)"
curl -fsSL "https://github.com/NVIDIA/k8s-nim-operator/archive/refs/tags/${NIM_OPERATOR_VERSION}.tar.gz" \
| tar -xz -C "${src}"
chart="$(ls -d "${src}"/k8s-nim-operator-*/deployments/helm/k8s-nim-operator)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can fails cryptically if the upstream tarball layout changes suggest to add an explicit existence check gives a clearer error

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hack/e2e/operators/dynamo/smoke.yaml`:
- Line 21: The services.Frontend definition is using the planner/control-plane
image, which will not start the frontend server as configured. Update the
Frontend service in the smoke config to reference the correct frontend image
instead of nvcr.io/nvidia/ai-dynamo/dynamo-planner, and keep the service
definition aligned with the intended frontend startup behavior in the same
services.Frontend block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 620cb2a0-0008-4a22-94fc-3531092fc394

📥 Commits

Reviewing files that changed from the base of the PR and between 4fd9fb4 and 01e70af.

📒 Files selected for processing (11)
  • hack/e2e/operators/_common.sh
  • hack/e2e/operators/dynamo/smoke.yaml
  • hack/e2e/operators/dynamo/verify.sh
  • hack/e2e/operators/grove/smoke.yaml
  • hack/e2e/operators/knative/smoke.yaml
  • hack/e2e/operators/kubeflow/install.sh
  • hack/e2e/operators/kuberay/smoke.yaml
  • hack/e2e/operators/kuberay/verify.sh
  • hack/e2e/operators/nim/image/main.go
  • hack/e2e/operators/nim/install.sh
  • hack/e2e/up.sh
🚧 Files skipped from review as they are similar to previous changes (9)
  • hack/e2e/operators/grove/smoke.yaml
  • hack/e2e/operators/kuberay/verify.sh
  • hack/e2e/operators/dynamo/verify.sh
  • hack/e2e/operators/kubeflow/install.sh
  • hack/e2e/operators/_common.sh
  • hack/e2e/operators/nim/install.sh
  • hack/e2e/operators/nim/image/main.go
  • hack/e2e/operators/knative/smoke.yaml
  • hack/e2e/up.sh

replicas: 1
extraPodSpec:
mainContainer:
image: "nvcr.io/nvidia/ai-dynamo/dynamo-planner:${DYNAMO_VERSION}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Does the NVIDIA ai-dynamo dynamo-planner container image also provide the DynamoGraphDeployment Frontend server binary?

💡 Result:

No, the NVIDIA ai-dynamo dynamo-planner container image does not provide the DynamoGraphDeployment Frontend server binary [1][2]. The dynamo-planner container is specifically designed as a runtime environment for the Dynamo control plane, which includes the Planner, Profiler, and Global Planner [1]. It is a slim, distroless image that focuses on SLA-aware control loops, forecasting, and Kubernetes integration [1]. In contrast, the Dynamo Frontend—which serves as the API gateway for LLM inference (e.g., using python -m dynamo.frontend)—is typically packaged in its own designated images, such as dynamo-vllm or other framework-specific runtime images [3][4]. While some earlier versions of Dynamo documentation might have mentioned using a common image for both profiling and frontend tasks in specific deployment requests [5], the architectural separation maintains distinct roles for the Planner (control plane) and the Frontend (data plane/API gateway) [1][3].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant manifest with line numbers.
sed -n '1,120p' hack/e2e/operators/dynamo/smoke.yaml | cat -n

# Also locate any other references to the planner image in this manifest.
rg -n 'dynamo-planner|dynamo-frontend|python -m dynamo\.frontend|frontend' hack/e2e/operators/dynamo/smoke.yaml

Repository: run-ai/karta

Length of output: 2175


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find Dynamo deployment examples that define a Frontend service image.
rg -n --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'componentType: frontend|dynamo-planner|dynamo-frontend|python -m dynamo\.frontend|frontend' \
  hack docs .github

# If there is a dedicated frontend image reference in the repo, show nearby context.
rg -n -C 3 'dynamo-frontend|python -m dynamo\.frontend|componentType: frontend' hack docs .github

Repository: run-ai/karta

Length of output: 1696


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the repository locations that mention the Dynamo frontend component or image.
rg -n -C 2 'dynamo-frontend|python -m dynamo\.frontend|componentType: frontend|dynamo-planner' hack docs .github

Repository: run-ai/karta

Length of output: 1774


Use a frontend image for services.Frontend. nvcr.io/nvidia/ai-dynamo/dynamo-planner is the planner/control-plane image, and this service has no entrypoint override to start a frontend server.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/e2e/operators/dynamo/smoke.yaml` at line 21, The services.Frontend
definition is using the planner/control-plane image, which will not start the
frontend server as configured. Update the Frontend service in the smoke config
to reference the correct frontend image instead of
nvcr.io/nvidia/ai-dynamo/dynamo-planner, and keep the service definition aligned
with the intended frontend startup behavior in the same services.Frontend block.

@AviadHayumi
AviadHayumi requested a review from Isan-Rivkin July 8, 2026 14:05
Comment thread hack/e2e/operators/kubeflow/install.sh Resolved
Comment thread hack/e2e/operators/kubeflow/install.sh Resolved
Comment thread hack/e2e/up.sh Resolved
Comment thread hack/e2e/up.sh Resolved
Comment thread hack/e2e/up.sh Resolved
Comment thread hack/e2e/operators/kubeflow/install.sh Resolved
Comment thread Makefile Resolved
Comment thread Makefile Outdated
Comment on lines +154 to +163
e2e-up-lws: ; @$(MAKE) e2e-up WORKLOADS=lws
e2e-up-jobset: ; @$(MAKE) e2e-up WORKLOADS=jobset
e2e-up-kuberay: ; @$(MAKE) e2e-up WORKLOADS=kuberay
e2e-up-kubeflow: ; @$(MAKE) e2e-up WORKLOADS=kubeflow
e2e-up-knative: ; @$(MAKE) e2e-up WORKLOADS=knative
e2e-up-kserve: ; @$(MAKE) e2e-up WORKLOADS=kserve
e2e-up-milvus: ; @$(MAKE) e2e-up WORKLOADS=milvus
e2e-up-grove: ; @$(MAKE) e2e-up WORKLOADS=grove
e2e-up-dynamo: ; @$(MAKE) e2e-up WORKLOADS=dynamo
e2e-up-nim: ; @$(MAKE) e2e-up WORKLOADS=nim

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems redundant, this just passes WORKLOADS=lws , why do we need to maintain all those?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not it makes it much easier , if you want to setup lws or dedicated workload it works much simpler and you can get auto-complete when running make

if i would like to setup env for example for nim and milvus it will be much simpler for me to have a look in the makefile then understand that i need to combine

WORKLOADS="nim,milvus"

I can drop it but i think it would help to users , wdyt ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not it makes it much easier

What you call "much easier" I call "maintainer liability" 😄

The problem is in one of the comments in this file

# Keep this list in sync with ALL_WORKLOADS in hack/e2e/up.sh

IMO it'll get stale very fast and it's hard to detect such staleness and here's why:

Say I add tomorrow a new target framework in a PR, there's no way reflecting this dependency here in the Makefile as well
➡️ It will be missed
➡️ The Makefile e2e-up-<target> becomes stale
➡️ this increases confusion for readers "where are all the supported frameworks defined? why is it not here?"

We need to maintain workloads in up.sh, in makefile and in ci / matrix prolly...
This is going to grow.
With that said, Im not blocking over this if you decide to keep it.

Comment thread hack/e2e/up.sh Outdated
# Exits non-zero on the first failure so a broken operator fails provisioning fast
# rather than partway through the e2e suite.
run_operator() {
local name="$1" dir="${OPERATORS_DIR}/$1" ver

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is ver here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to extract version Ive added local before

Comment thread hack/e2e/up.sh Outdated
Comment on lines +122 to +125
# Untaint the control-plane so its capacity is schedulable: the single worker
# cannot hold every operator plus a real Milvus/Knative/KServe workload at once.
kubectl taint nodes "${CLUSTER_NAME}-control-plane" \
node-role.kubernetes.io/control-plane:NoSchedule- 2>/dev/null || true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder here what's the right approach (not a blocker):

  1. Flakiness risk: regular pods now compete for resources. If the API server gets starved, you get weird timeout flakes that look like operator bugs. A second worker in kind-config.yaml is the cleaner fix IMO, costs one more container tho.
  2. dropping 2>/dev/null so the message is at least visible ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untaint removed, 2 workers instead

Comment thread hack/e2e/global.env Resolved

@Isan-Rivkin Isan-Rivkin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there :)
Thanks for addressing it ,minor comments left, PTAL!
BTW, for next time it would be much easier to review framework/infra with 1-2 tests, merge it and then incrementally open newPR(s) for each operator

Comment thread hack/e2e/global.env Outdated
# Override to test another Kubernetes version.
KIND_NODE_IMAGE="${KIND_NODE_IMAGE:-kindest/node:v1.34.0}"

# CI toolchain: the e2e workflow (.github/workflows/e2e.yaml) installs these

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path doesn't actually exist confusing (i suggest to remove it instead of updating the path. this is just noise)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread hack/e2e/operators/kubeflow/install.sh Outdated
# mpi-operator (v2beta1) below. Drop the bundled MPIJob CRD before each apply:
# kube will not re-point it to v2beta1 in place while v1 is still a stored version.
echo "==> Kubeflow training-operator ${KUBEFLOW_VERSION}"
kubectl delete crd mpijobs.kubeflow.org --ignore-not-found

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add --timeout?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Comment thread hack/e2e/operators/kubeflow/install.sh Outdated
rollout_wait kubeflow deploy/training-operator

echo "==> mpi-operator ${MPI_OPERATOR_VERSION} (kubeflow.org/v2beta1 MPIJob)"
kubectl delete crd mpijobs.kubeflow.org --ignore-not-found

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add --timeout?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Comment thread hack/e2e/up.sh Outdated
lws) echo "${LWS_VERSION}" ;;
jobset) echo "${JOBSET_VERSION}" ;;
kuberay) echo "${KUBERAY_VERSION}" ;;
kubeflow) echo "${KUBEFLOW_VERSION}" ;;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version_of("kubeflow") omits MPI_OPERATOR_VERSION

  • If it fails due to an mpi-operator, the installed version isn't visible.

Suggestion:
In version_of, change the kubeflow case to echo "${KUBEFLOW_VERSION}+mpi${MPI_OPERATOR_VERSION}"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

containers:
- name: mpi-worker
image: busybox:1.36
command: ["sleep", "infinity"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mpi-operator leaves pods alive after MPIJob deletion. Worker runs sleep infinity indefinitely occupying a scheduler slot on the cluster.
Maybe change to cleanPodPolicy: All?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

- name: mpi-worker
image: busybox:1.36
command: ["sleep", "infinity"]
resources:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add limits: {cpu: 100m, memory: 64Mi}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Comment thread Makefile Outdated
Comment on lines +154 to +163
e2e-up-lws: ; @$(MAKE) e2e-up WORKLOADS=lws
e2e-up-jobset: ; @$(MAKE) e2e-up WORKLOADS=jobset
e2e-up-kuberay: ; @$(MAKE) e2e-up WORKLOADS=kuberay
e2e-up-kubeflow: ; @$(MAKE) e2e-up WORKLOADS=kubeflow
e2e-up-knative: ; @$(MAKE) e2e-up WORKLOADS=knative
e2e-up-kserve: ; @$(MAKE) e2e-up WORKLOADS=kserve
e2e-up-milvus: ; @$(MAKE) e2e-up WORKLOADS=milvus
e2e-up-grove: ; @$(MAKE) e2e-up WORKLOADS=grove
e2e-up-dynamo: ; @$(MAKE) e2e-up WORKLOADS=dynamo
e2e-up-nim: ; @$(MAKE) e2e-up WORKLOADS=nim

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not it makes it much easier

What you call "much easier" I call "maintainer liability" 😄

The problem is in one of the comments in this file

# Keep this list in sync with ALL_WORKLOADS in hack/e2e/up.sh

IMO it'll get stale very fast and it's hard to detect such staleness and here's why:

Say I add tomorrow a new target framework in a PR, there's no way reflecting this dependency here in the Makefile as well
➡️ It will be missed
➡️ The Makefile e2e-up-<target> becomes stale
➡️ this increases confusion for readers "where are all the supported frameworks defined? why is it not here?"

We need to maintain workloads in up.sh, in makefile and in ci / matrix prolly...
This is going to grow.
With that said, Im not blocking over this if you decide to keep it.

Add hack/e2e: a standalone provisioner that spins up a local kind cluster,
builds and deploys the Karta operator, and installs the upstream workload
operators the suite exercises (cert-manager, fake-gpu-operator, LeaderWorkerSet,
JobSet, KubeRay, Kubeflow training-operator, Knative + Kourier, KServe, milvus,
Grove + kai-scheduler, dynamo, k8s-nim-operator). Each operator is its own
standalone install.sh + verify.sh smoke test; versions are pinned in global.env;
up.sh resolves dependencies and prints a per-operator install summary. Adds the
Makefile e2e-up / e2e-up-<op> / e2e-down / lint-shell targets and a README.

Provisioner only; the test suite and CI workflow land separately.

Signed-off-by: aviadh <aviad.hayumi@gmail.com>
- up.sh: split IMAGE on the last ':' so registry-port refs
  (localhost:5000/karta:e2e) keep their tag; label all worker nodes by role
  selector instead of a hardcoded name; require tar; --wait the fake-gpu-operator.
- _common.sh: run_smoke always deletes the throwaway resource even when the apply
  exhausts its retries; apply_with_retry only consumes leading numeric args so a
  caller can pass kubectl flags directly.
- nim/install.sh: trap-clean the fetched-chart temp dir on any failure and error
  clearly if the upstream tarball layout changes.
- kubeflow/install.sh: --force-conflicts to match the other server-side applies.
- smoke tests: pin busybox (grove) and knative helloworld-go (by digest); render
  DYNAMO_VERSION / RAY_VERSION from global.env into the dynamo/kuberay smokes.
- nim image: add Read/Write/Idle timeouts to the HTTP server.

Signed-off-by: aviadh <aviad.hayumi@gmail.com>
kubeflow/install.sh drops the training-operator's bundled kubeflow.org/v1 MPIJob
CRD and installs the standalone kubeflow mpi-operator (v0.8.2, kubeflow.org/v2beta1),
and restricts the training-operator with --enable-scheme (no mpijob) so it does not
watch the dropped CRD. Matches run:ai self-hosted.

Signed-off-by: aviadh <aviad.hayumi@gmail.com>
- up.sh: drop the --plan alias (keep --list), guard the bash 3.2
  empty-array case so a bare invocation lists the full plan, trim the
  header to point at the README, tidy the ver local.
- kubeflow: install the standalone mpi-operator and smoke-test it with
  mpi-smoke.yaml so a broken operator fails provisioning fast; trim the
  install.sh comments.
- kind-config: add a second worker (control-plane stays tainted) so
  workloads do not starve the API server.
- README: document the install/verify exit-code contract and the
  two-worker shape; global.env: pin MPI_OPERATOR_VERSION.
- ci: run make lint-shell in the Pull Request workflow.

Signed-off-by: aviadh <aviad.hayumi@gmail.com>
- global.env: drop the dangling .github/workflows/e2e.yaml reference.
- kubeflow/install.sh: bound the mpijobs CRD deletes with --timeout=60s.
- up.sh: version_of kubeflow now reports the mpi-operator version too
  (KUBEFLOW_VERSION+mpi<MPI_OPERATOR_VERSION>) in the install summary.
- mpi-smoke.yaml: cleanPodPolicy All so the worker pods are reaped when the
  launcher finishes (the operator does not garbage-collect them on delete);
  add cpu/memory limits to both containers.
- Makefile: drop the per-operator e2e-up-<name> targets; select operators with
  make e2e-up WORKLOADS=<name>, so there is no list to track ALL_WORKLOADS.
- README: document only make e2e-up WORKLOADS=<name>.

Signed-off-by: aviadh <aviad.hayumi@gmail.com>

@Isan-Rivkin Isan-Rivkin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thank you for this, that will sure give us great confidence!

@AviadHayumi
AviadHayumi merged commit d7f97fb into main Jul 15, 2026
2 checks passed
@AviadHayumi
AviadHayumi deleted the e2e-infra branch July 15, 2026 05:58
AviadHayumi added a commit that referenced this pull request Jul 16, 2026
…ovisioner

The kind provisioner (hack/e2e) landed on main via #144. This adds the test
side on top of it: the test/e2e Go module (a separate module that drives each
bundled docs/samples definition against a real operator and asserts Karta's
reading of it), the E2E GitHub Actions workflow, the make test-e2e target, and
the e2e design notes.

Signed-off-by: aviadh <aviad.hayumi@gmail.com>
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.

feat(e2e): operator e2e environment provisioner with per-operator smoke tests

4 participants