Skip to content

feat(byoo-perf): deploy the authentic collector and wire run/cleanup - #623

Merged
shobham-nv merged 1 commit into
mainfrom
shobham/418-byoo-perf-deploy
Aug 10, 2026
Merged

feat(byoo-perf): deploy the authentic collector and wire run/cleanup#623
shobham-nv merged 1 commit into
mainfrom
shobham/418-byoo-perf-deploy

Conversation

@shobham-nv

@shobham-nv shobham-nv commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Adds the deployment milestone to the BYOO collector perf suite. run now renders the production workload shape via icms-translate, validates it, deploys the authentic collector to a cluster (k3d or remote) behind a harness OTLP Service, waits for readiness, and tears it down; cleanup removes what the suite created. Load generation and measurement land in a later milestone.

Additional Details

  • pkg/deploy (new): a Kubernetes client that applies the rendered bench pod plus a harness ClusterIP OTLP Service, waits for pod readiness (failing fast on CrashLoopBackOff/ImagePullBackOff/config errors instead of blocking to timeout), and cleans up scoped by the app.kubernetes.io/part-of=byoo-perf label so it never deletes unrelated resources. Repeatable deploys replace existing objects. The harness Service gives load generators a stable in-cluster address regardless of shape; for the container shape (a localhost sidecar in production) it is harness-only and never alters the collector spec under test.
  • cmd/perf: the previously-stubbed cobra run and cleanup commands are implemented against pkg/deploy, with per-shape namespaces (byoo-perf-container / byoo-perf-helm) so both shapes can be deployed without colliding, and --retain to keep resources for inspection.
  • go.mod: adds k8s.io/client-go, pinned to v0.34.2 via replace, mirroring the shared lib's convention.
  • The suite is still the standalone GOWORK=off module wired into the required perf CI job (from feat(byoo-perf): add scaffolding, translation-driven rendering, and validation #422), so these tests run on every change to this subtree.

For the Reviewer

  • pkg/deploy/deploy.go — the deploy/wait/cleanup logic and the label-scoped teardown.
  • cmd/perf/main.gorunRun/runCleanup and per-shape namespacing.
  • Note: run validates all selectors before it ever contacts a cluster, which keeps the new CLI tests hermetic.

For QA

  • make perf-test (build + vet + test, GOWORK=off) passes locally; pkg/deploy is unit-tested against a fake clientset (namespace idempotency, pod+service creation, repeatable deploys, ready/crash-loop paths, label-scoped cleanup).
  • Full cluster runs (perf run against k3d/remote) exercise real deployment; unit tests do not require a cluster.

Issues

Relates to #416
Closes #418

Checklist

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features
    • Added performance-suite commands to render, deploy, monitor readiness, and clean up OpenTelemetry Collector workloads.
    • Added configurable cluster access, readiness timeouts, retention settings, and isolated namespaces for multiple shapes.
    • Added repeatable deployments, endpoint reporting, validation, and targeted cleanup of suite-created resources.
  • Documentation
    • Updated performance-suite guidance for available commands and deployment workflows.
  • Chores
    • Updated the BYOO OpenTelemetry Collector version to 0.157.12.

@shobham-nv
shobham-nv requested a review from a team as a code owner August 3, 2026 06:17
@shobham-nv
shobham-nv requested a review from vrv3814 August 3, 2026 06:17
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a547d47a-34f5-4bb9-9864-6c05177c1e4f

📥 Commits

Reviewing files that changed from the base of the PR and between 435be42 and a5a2164.

📒 Files selected for processing (2)
  • src/compute-plane-services/byoo-otel-collector/perf/README.md
  • src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main.go
  • src/compute-plane-services/byoo-otel-collector/perf/README.md

📝 Walkthrough

Walkthrough

The performance suite now deploys authentic BYOO OpenTelemetry Collector workloads to Kubernetes, waits for readiness, reports endpoints, and cleans up suite-owned resources. The CLI supports cluster configuration, shape-specific namespaces, retention, and cleanup commands.

Changes

BYOO performance deployment

Layer / File(s) Summary
Kubernetes deployment lifecycle
src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/*, src/compute-plane-services/byoo-otel-collector/perf/go.mod
Added Kubernetes client creation, namespace management, repeatable pod and Service deployment, readiness polling, endpoint construction, terminal failure reporting, and label-scoped cleanup. Added tests for deployment, readiness, idempotency, and cleanup.
Performance CLI workflow
src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/*, src/compute-plane-services/byoo-otel-collector/perf/README.md
Implemented run and cleanup, including validation, cluster flags, readiness timeout, retention, endpoint reporting, and multi-shape namespace isolation. Updated tests and documentation.
Collector release metadata
src/compute-plane-services/byoo-otel-collector/VERSION
Updated the collector version from 0.157.11 to 0.157.12.

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

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant PerfCLI
  participant Renderer
  participant DeployClient
  participant KubernetesCluster
  Operator->>PerfCLI: Run selected shape
  PerfCLI->>Renderer: Render and validate workload
  PerfCLI->>DeployClient: Deploy workload
  DeployClient->>KubernetesCluster: Create or replace resources
  PerfCLI->>DeployClient: Wait for readiness
  DeployClient-->>PerfCLI: Report in-cluster endpoints
  PerfCLI->>DeployClient: Cleanup unless retention is enabled
Loading

Suggested reviewers: vrv3814

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Deployment and cleanup requirements are addressed, but local k3d provisioning, image build/import, provenance, and related test coverage remain incomplete for issue #418. Implement the remaining #418 requirements for k3d provisioning, image build/import and handling, provenance recording, and mode-selection and image-handling tests.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses the required feat(scope): subject format and accurately describes the collector deployment and run/cleanup changes.
Out of Scope Changes check ✅ Passed The code, dependency, documentation, and test changes directly support collector deployment, run, cleanup, namespace isolation, and readiness objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch shobham/418-byoo-perf-deploy

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain modules listed in go.work or their selected dependencies"


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy.go (1)

243-271: 🧹 Nitpick | 🔵 Trivial

Cleanup never removes the namespace itself.

Cleanup deletes suite-labeled pods and Services but leaves the namespace in place. Over repeated runs, namespaces created by EnsureNamespace accumulate. Confirm this is intentional (e.g., to avoid slow namespace termination) or consider deleting the namespace when it was created by this suite and is now empty.

🤖 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 `@src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy.go`
around lines 243 - 271, Update Client.Cleanup to remove the suite-created
namespace after deleting its labeled pods and services, using the existing
ownership/creation tracking from EnsureNamespace. Delete the namespace only when
this suite created it and cleanup completed successfully, while preserving the
current behavior for pre-existing namespaces and propagating non-NotFound
deletion errors.
🤖 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 `@src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main.go`:
- Around line 208-220: Update the deployment flow around client.Deploy and
client.WaitPodReady to clean up resources whenever either operation fails and
cfg.retain is false. On Deploy errors, invoke client.Cleanup before returning;
on readiness errors, preserve the original failure while also reporting any
cleanup failure instead of discarding it, using an appropriate combined error.

In `@src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy.go`:
- Around line 173-190: Update applyPod to wrap errors returned by waitPodDeleted
with context identifying the pod deletion wait, and update the waitPodDeleted
poll function to wrap the underlying Kubernetes error before returning it. Use
Go %w wrapping at both points while preserving the existing error propagation
behavior.

---

Nitpick comments:
In `@src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy.go`:
- Around line 243-271: Update Client.Cleanup to remove the suite-created
namespace after deleting its labeled pods and services, using the existing
ownership/creation tracking from EnsureNamespace. Delete the namespace only when
this suite created it and cleanup completed successfully, while preserving the
current behavior for pre-existing namespaces and propagating non-NotFound
deletion errors.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 221f0fa3-ce78-4b69-95ad-e3eafec641c7

📥 Commits

Reviewing files that changed from the base of the PR and between 7886526 and f5022a5.

⛔ Files ignored due to path filters (1)
  • src/compute-plane-services/byoo-otel-collector/perf/go.sum is excluded by !**/*.sum
📒 Files selected for processing (7)
  • src/compute-plane-services/byoo-otel-collector/VERSION
  • src/compute-plane-services/byoo-otel-collector/perf/README.md
  • src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main.go
  • src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main_test.go
  • src/compute-plane-services/byoo-otel-collector/perf/go.mod
  • src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy.go
  • src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy_test.go

Comment thread src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main.go Outdated
@shobham-nv
shobham-nv force-pushed the shobham/418-byoo-perf-deploy branch from abb1df5 to af99feb Compare August 10, 2026 13:01
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@src/compute-plane-services/byoo-otel-collector/perf/README.md`:
- Around line 33-34: Update the README layout entry around pkg/deploy and the
referenced text near the additional affected section: replace em dash characters
with permitted punctuation, remove bold Markdown emphasis around does not, and
ensure the changed committed text contains only allowed ASCII characters without
emojis or other prohibited emphasis.
- Line 90: Update the documentation wording in the README sentence near the
kubeconfig cleanup description, replacing “afterwards” with the American English
spelling “afterward.”
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 26a81f3f-0278-4546-b430-2c4acb17ec6b

📥 Commits

Reviewing files that changed from the base of the PR and between cd51e37 and af99feb.

⛔ Files ignored due to path filters (1)
  • src/compute-plane-services/byoo-otel-collector/perf/go.sum is excluded by !**/*.sum
📒 Files selected for processing (7)
  • src/compute-plane-services/byoo-otel-collector/VERSION
  • src/compute-plane-services/byoo-otel-collector/perf/README.md
  • src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main.go
  • src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main_test.go
  • src/compute-plane-services/byoo-otel-collector/perf/go.mod
  • src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy.go
  • src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy_test.go
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/compute-plane-services/byoo-otel-collector/perf/go.mod
  • src/compute-plane-services/byoo-otel-collector/VERSION
  • src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy_test.go
  • src/compute-plane-services/byoo-otel-collector/perf/pkg/deploy/deploy.go
  • src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main.go
  • src/compute-plane-services/byoo-otel-collector/perf/cmd/perf/main_test.go

Comment thread src/compute-plane-services/byoo-otel-collector/perf/README.md Outdated
Comment thread src/compute-plane-services/byoo-otel-collector/perf/README.md Outdated
@shobham-nv
shobham-nv force-pushed the shobham/418-byoo-perf-deploy branch from af99feb to 435be42 Compare August 10, 2026 13:12
Add the deployment milestone for the BYOO collector perf suite: render the
production workload shape, deploy the authentic collector to a cluster, wait
for it to become ready, and tear it back down. Load generation and measurement
land in a later milestone.

- pkg/deploy: Kubernetes client that applies the rendered bench pod plus a
  harness ClusterIP OTLP Service, waits for pod readiness (failing fast on
  crash/image-pull loops), and cleans up scoped by the suite's part-of label
  so it never touches unrelated resources. Repeatable deploys replace existing
  objects. Unit-tested against a fake clientset.
- cmd/perf: implement the cobra run and cleanup commands (previously stubs)
  against pkg/deploy, with per-shape namespaces so container and helm shapes
  never collide, and --retain to keep resources for inspection.
- cmd/perf tests: run/cleanup flag defaults, hermetic invalid-selector checks
  (validation happens before any cluster access), and namespaceForShape.
- go.mod: add k8s.io/client-go (pinned to v0.34.2 via replace, mirroring the
  shared lib's convention).
- README: document run and cleanup.
- VERSION: bump to 0.157.12 for the collector-dir change.

Relates to #416. Closes #418.

Signed-off-by: shobham <shobham@nvidia.com>
@shobham-nv
shobham-nv force-pushed the shobham/418-byoo-perf-deploy branch from 435be42 to a5a2164 Compare August 10, 2026 14:59
@shobham-nv
shobham-nv added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit 61f3044 Aug 10, 2026
21 checks passed
@shobham-nv
shobham-nv deleted the shobham/418-byoo-perf-deploy branch August 10, 2026 15:21
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.

byoo-perf-suite: Add collector deployment and image handling for k3d and remote modes

2 participants