Repository navigation
feat(e2e): kind-based e2e cluster provisioner (hack/e2e) - #144
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis PR adds e2e cluster orchestration under ChangesE2E cluster provisioning and operators
Estimated code review effort: 4 (Complex) | ~60 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (8)
hack/e2e/operators/dynamo/smoke.yaml (1)
20-20: 📐 Maintainability & Code Quality | 🔵 TrivialImage tag not tied to
DYNAMO_VERSION.
install.shpins the platform chart to${DYNAMO_VERSION}fromglobal.env, but this smoke manifest hardcodesdynamo-planner:1.2.1as a separate literal. BumpingDYNAMO_VERSIONwon't update this file, risking version skew between the installed platform/operator and the smoke test image.♻️ Suggested approach
Since
smoke.yamlis static and applied directly viaapply_with_retry/kubectl apply(see_common.shrun_smoke), consider templating the image tag and substituting${DYNAMO_VERSION}before apply, e.g. inverify.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" defaultand replace the literal tag with
${DYNAMO_VERSION}insmoke.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 winRun as non-root user.
Image runs as root with no
USERdirective. 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 valueHardcoded default cluster name duplicated across files.
DEFAULT_CLUSTER="karta-e2e"here duplicates the same literal inglobal.env'sCLUSTER_NAMEdefault and indown.sh's ownDEFAULT_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 betweenup.shanddown.sh.Possible approach
Define the default once in
global.env(e.g.DEFAULT_CLUSTER_NAME="karta-e2e") and reference it from bothup.shanddown.shinstead 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_ofresolves 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 winAdd 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 valueConsider pinning the busybox image tag.
busybox:latestis 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 valueOptional: pin
helloworld-goto a digest for full reproducibility.
ghcr.io/knative/helloworld-go:latestmatches Knative's own documented sample usage, but a:latesttag 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 winRetry the JobSet manifest apply
hack/e2e/operators/jobset/install.sh:12-16Use
apply_with_retryhere 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
📒 Files selected for processing (44)
Makefilehack/e2e/README.mdhack/e2e/down.shhack/e2e/global.envhack/e2e/kind-config.yamlhack/e2e/operators/_common.shhack/e2e/operators/dynamo/install.shhack/e2e/operators/dynamo/smoke.yamlhack/e2e/operators/dynamo/verify.shhack/e2e/operators/grove/install.shhack/e2e/operators/grove/smoke.yamlhack/e2e/operators/grove/values.yamlhack/e2e/operators/grove/verify.shhack/e2e/operators/jobset/install.shhack/e2e/operators/jobset/smoke.yamlhack/e2e/operators/jobset/verify.shhack/e2e/operators/knative/install.shhack/e2e/operators/knative/smoke.yamlhack/e2e/operators/knative/verify.shhack/e2e/operators/kserve/disable-istio-vh.yamlhack/e2e/operators/kserve/install.shhack/e2e/operators/kserve/smoke.yamlhack/e2e/operators/kserve/verify.shhack/e2e/operators/kubeflow/install.shhack/e2e/operators/kubeflow/smoke.yamlhack/e2e/operators/kubeflow/verify.shhack/e2e/operators/kuberay/install.shhack/e2e/operators/kuberay/smoke.yamlhack/e2e/operators/kuberay/verify.shhack/e2e/operators/lws/install.shhack/e2e/operators/lws/smoke.yamlhack/e2e/operators/lws/verify.shhack/e2e/operators/milvus/install.shhack/e2e/operators/milvus/smoke.yamlhack/e2e/operators/milvus/verify.shhack/e2e/operators/nim/image/Dockerfilehack/e2e/operators/nim/image/README.mdhack/e2e/operators/nim/image/nim_llm.pyhack/e2e/operators/nim/image/nim_service.protohack/e2e/operators/nim/image/requirements.txthack/e2e/operators/nim/install.shhack/e2e/operators/nim/smoke.yamlhack/e2e/operators/nim/verify.shhack/e2e/up.sh
| 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) ;\ | ||
| } |
There was a problem hiding this comment.
📐 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.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
hack/e2e/operators/nim/image/requirements.txt (1)
4-12: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winFastAPI/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.1carries a HIGH-severity DoS finding (GHSA-8qvm-5x2c-j2w7) that is patched in later 4.25.x/5.x releases — worth bumping. Separately,h11isn't pinned directly here and the scan resolved a CRITICAL, very old0.9.0(GHSA-vqfr-h8mv-ghfj, fixed in 0.16.0); pinh11>=0.16.0explicitly 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.0Since 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-shellhas no guard for a missingshellcheckbinary.Unlike
golangci-lint/go-licence-detector,shellcheckisn'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 valueAdd a language to the fenced code block.
markdownlint flags this block (layout diagram) for missing a language identifier (MD040). Use
textsince 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 winContainer runs as root.
No
USERdirective 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
📒 Files selected for processing (44)
Makefilehack/e2e/README.mdhack/e2e/down.shhack/e2e/global.envhack/e2e/kind-config.yamlhack/e2e/operators/_common.shhack/e2e/operators/dynamo/install.shhack/e2e/operators/dynamo/smoke.yamlhack/e2e/operators/dynamo/verify.shhack/e2e/operators/grove/install.shhack/e2e/operators/grove/smoke.yamlhack/e2e/operators/grove/values.yamlhack/e2e/operators/grove/verify.shhack/e2e/operators/jobset/install.shhack/e2e/operators/jobset/smoke.yamlhack/e2e/operators/jobset/verify.shhack/e2e/operators/knative/install.shhack/e2e/operators/knative/smoke.yamlhack/e2e/operators/knative/verify.shhack/e2e/operators/kserve/disable-istio-vh.yamlhack/e2e/operators/kserve/install.shhack/e2e/operators/kserve/smoke.yamlhack/e2e/operators/kserve/verify.shhack/e2e/operators/kubeflow/install.shhack/e2e/operators/kubeflow/smoke.yamlhack/e2e/operators/kubeflow/verify.shhack/e2e/operators/kuberay/install.shhack/e2e/operators/kuberay/smoke.yamlhack/e2e/operators/kuberay/verify.shhack/e2e/operators/lws/install.shhack/e2e/operators/lws/smoke.yamlhack/e2e/operators/lws/verify.shhack/e2e/operators/milvus/install.shhack/e2e/operators/milvus/smoke.yamlhack/e2e/operators/milvus/verify.shhack/e2e/operators/nim/image/Dockerfilehack/e2e/operators/nim/image/README.mdhack/e2e/operators/nim/image/nim_llm.pyhack/e2e/operators/nim/image/nim_service.protohack/e2e/operators/nim/image/requirements.txthack/e2e/operators/nim/install.shhack/e2e/operators/nim/smoke.yamlhack/e2e/operators/nim/verify.shhack/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
There was a problem hiding this comment.
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
📒 Files selected for processing (43)
Makefilehack/e2e/README.mdhack/e2e/down.shhack/e2e/global.envhack/e2e/kind-config.yamlhack/e2e/operators/_common.shhack/e2e/operators/dynamo/install.shhack/e2e/operators/dynamo/smoke.yamlhack/e2e/operators/dynamo/verify.shhack/e2e/operators/grove/install.shhack/e2e/operators/grove/smoke.yamlhack/e2e/operators/grove/values.yamlhack/e2e/operators/grove/verify.shhack/e2e/operators/jobset/install.shhack/e2e/operators/jobset/smoke.yamlhack/e2e/operators/jobset/verify.shhack/e2e/operators/knative/install.shhack/e2e/operators/knative/smoke.yamlhack/e2e/operators/knative/verify.shhack/e2e/operators/kserve/disable-istio-vh.yamlhack/e2e/operators/kserve/install.shhack/e2e/operators/kserve/smoke.yamlhack/e2e/operators/kserve/verify.shhack/e2e/operators/kubeflow/install.shhack/e2e/operators/kubeflow/smoke.yamlhack/e2e/operators/kubeflow/verify.shhack/e2e/operators/kuberay/install.shhack/e2e/operators/kuberay/smoke.yamlhack/e2e/operators/kuberay/verify.shhack/e2e/operators/lws/install.shhack/e2e/operators/lws/smoke.yamlhack/e2e/operators/lws/verify.shhack/e2e/operators/milvus/install.shhack/e2e/operators/milvus/smoke.yamlhack/e2e/operators/milvus/verify.shhack/e2e/operators/nim/image/Dockerfilehack/e2e/operators/nim/image/README.mdhack/e2e/operators/nim/image/go.modhack/e2e/operators/nim/image/main.gohack/e2e/operators/nim/install.shhack/e2e/operators/nim/smoke.yamlhack/e2e/operators/nim/verify.shhack/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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
Thanks, this will be very valuable for us for sure!
Left comments, nothing major.
| 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##*:}" \ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)" |
There was a problem hiding this comment.
no trap ... EXIT
A failed helm install exits before rm -rf "${src}" leaking the temp directory (dynamo/install.sh correctly uses a trap).
There was a problem hiding this comment.
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
|
|
||
| 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 \ |
There was a problem hiding this comment.
maybe add --wait?
IIUC subsequent steps that need the fake GPU node label may race a not-yet-ready operator
There was a problem hiding this comment.
yep , added --wait so the steps after it dont race a not-ready operator
| podSpec: | ||
| containers: | ||
| - name: worker | ||
| image: busybox:latest |
There was a problem hiding this comment.
all other use 1.36 let's be consistent, in this case I vote for pinned version NOT latest
There was a problem hiding this comment.
done , pinned it to busybox:1.36 like the rest
| name: ray-smoke | ||
| namespace: default | ||
| spec: | ||
| rayVersion: "2.40.0" |
There was a problem hiding this comment.
Maybe use RAY_VERSION ?
| # 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() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
you can pass flags straight through (apply_with_retry --server-side) and tries stays at the default
| 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)" |
There was a problem hiding this comment.
this can fails cryptically if the upstream tarball layout changes suggest to add an explicit existence check gives a clearer error
There was a problem hiding this comment.
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
📒 Files selected for processing (11)
hack/e2e/operators/_common.shhack/e2e/operators/dynamo/smoke.yamlhack/e2e/operators/dynamo/verify.shhack/e2e/operators/grove/smoke.yamlhack/e2e/operators/knative/smoke.yamlhack/e2e/operators/kubeflow/install.shhack/e2e/operators/kuberay/smoke.yamlhack/e2e/operators/kuberay/verify.shhack/e2e/operators/nim/image/main.gohack/e2e/operators/nim/install.shhack/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}" |
There was a problem hiding this comment.
🎯 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:
- 1: https://catalog.ngc.nvidia.com/orgs/nvidia/ai-dynamo/containers/dynamo-planner/-
- 2: https://github.com/ai-dynamo/dynamo/blob/ce0cb901/container/templates/planner.Dockerfile
- 3: https://docs.dynamo.nvidia.com/dynamo/dev/components/frontend
- 4: https://github.com/ai-dynamo/dynamo/blob/main/docs/kubernetes/deployment/create-deployment.md
- 5: https://github.com/ai-dynamo/dynamo/blob/ce0cb901/docs/components/planner/planner-examples.md
🏁 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.yamlRepository: 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 .githubRepository: 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 .githubRepository: 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.
| 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 |
There was a problem hiding this comment.
seems redundant, this just passes WORKLOADS=lws , why do we need to maintain all those?
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
| # 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 |
There was a problem hiding this comment.
to extract version Ive added local before
| # 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 |
There was a problem hiding this comment.
I wonder here what's the right approach (not a blocker):
- 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.yamlis the cleaner fix IMO, costs one more container tho. - dropping
2>/dev/null so the message is at least visible?
There was a problem hiding this comment.
untaint removed, 2 workers instead
Isan-Rivkin
left a comment
There was a problem hiding this comment.
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
| # 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 |
There was a problem hiding this comment.
path doesn't actually exist confusing (i suggest to remove it instead of updating the path. this is just noise)
| # 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 |
| 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 |
| lws) echo "${LWS_VERSION}" ;; | ||
| jobset) echo "${JOBSET_VERSION}" ;; | ||
| kuberay) echo "${KUBERAY_VERSION}" ;; | ||
| kubeflow) echo "${KUBEFLOW_VERSION}" ;; |
There was a problem hiding this comment.
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}"
| containers: | ||
| - name: mpi-worker | ||
| image: busybox:1.36 | ||
| command: ["sleep", "infinity"] |
There was a problem hiding this comment.
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?
| - name: mpi-worker | ||
| image: busybox:1.36 | ||
| command: ["sleep", "infinity"] | ||
| resources: |
There was a problem hiding this comment.
Add limits: {cpu: 100m, memory: 64Mi}
| 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 |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
LGTM!
Thank you for this, that will sure give us great confidence!
…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>
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.shsmoke test; versions are pinned inglobal.env;up.shresolves dependencies (kserve pulls knative, dynamo pulls grove) and prints a per-operator install summary. Adds the Makefilee2e-up/e2e-up-<op>/e2e-down/lint-shelltargets and a README.up.shbuilds the operator image fromoperator/Dockerfileand installscharts/karta, both already onmain, 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
git commit -s)hack/e2e/README.md)make check) - provisioner only; validated withmake lint-shelland./hack/e2e/up.sh --listSummary by CodeRabbit
e2e-up-alloption.