← Back to Pull requests

[Feature][History Server] Make the collector image configurable on the operator #5207

Open
unknown opened this pull request with 517 lines diff across 6 files
View on GitHub
unknown unknown commented on Aug 28, 2026 02:28 UTC
Author

Why are these changes needed?

Today the collector sidecar image can only be set per RayCluster, through
spec.historyServerOptions.collectorOptions.image, and the field is required. That has two
consequences:

  • Every RayCluster manifest carries a collector image tag that has to be bumped by hand on every

  • KubeRay upgrade, and the docs currently point people at a nightly tag.
  • Users whose clusters cannot pull from Docker Hub or quay.io have no way to point all of their

  • RayClusters at a mirror registry, other than editing every manifest.

    Pinning the collector version in the operator code instead would only move the problem: it would
    have to be updated on every release.

    This PR makes the collector image an operator-level setting and lets the default tag follow the
    KubeRay version, so the collector stays in sync with the operator without a release-time code
    change. The image is now resolved in this order:

    1. spec.historyServerOptions.collectorOptions.image on the RayCluster, if set.
    2. The image configured on the operator: the --collector-image flag, the collectorImage field
    of the operator configuration file, or the collectorImage value of the kuberay-operator
    Helm chart.
    3. quay.io/kuberay/collector with the tag matching the KubeRay version (nightly on master, the
    release tag on a release).

    To make (1) optional, collectorOptions.image is no longer rejected when empty; the RayCluster
    then inherits the operator-level image. The field was already +optional in the CRD, so there is
    no CRD change. This only relaxes validation, so existing manifests keep working unchanged.

    Changes:

  • ray-operator: new collectorImage field on the Configuration API with defaulting, the

  • matching --collector-image flag, and the value plumbed through RayClusterReconcilerOptions
    into the head and worker Pod builders.
  • ray-operator: validateCollectorOptions no longer requires collectorOptions.image.

  • helm-chart/kuberay-operator: new collectorImage value, wired into both the flag and the

  • operator configuration ConfigMap paths.
  • Docs and the ray-cluster.historyserver.yaml sample no longer hardcode a collector image, and

  • describe how to configure it on the operator.

    Example:

    helm install kuberay-operator kuberay/kuberay-operator \
      --set collectorImage=my-registry.io/kuberay/collector:v1.7.0
    

    Related issue number

    Part of the History Server collector work in #4274.

    Labels

    <!-- Please add the appropriate labels to this PR. -->

  • If this PR has user-facing changes that require documentation updates at release time, I have added the doc-updates-required label.

  • If this PR contains breaking changes, I have added the breaking-change label.
  • This adds a user-facing operator flag and Helm value; please add doc-updates-required if the
    release docs should mention it as well. There are no breaking changes: the new configuration is
    optional and validation is only relaxed.

    Checks

  • I've made sure the tests are passing.

  • Testing Strategy

  • - [x] Unit tests

    New tests:

  • TestSetDefaultCollectorImage (controllers/ray/common): the injected collector container

  • inherits the operator image only when the RayCluster leaves it empty.
  • TestBuildPodsCollectorImage (controllers/ray): head and worker Pods fall back to the

  • operator image, and the RayCluster value takes precedence.
  • Test_decodeConfig case for collectorImage, plus the defaulting expectations.

  • TestValidateCollectorOptions: a missing image is now valid.

  • kuberay-operator chart tests for both the --collector-image flag and the ConfigMap field,

  • including the "not set" cases.

    Locally: go build ./..., go vet ./..., go test for the ray-operator packages,
    helm unittest helm-chart/kuberay-operator --strict (73/73) and the repository pre-commit
    hooks (golangci-lint, kubeconform, markdownlint, yamlfmt, helm-docs) all pass. The two
    envtest-based suites (controllers/ray TestAPIs and pkg/webhooks/v1) were not run locally
    because the envtest assets are not installed in my environment; they are left to CI.

    Diff: 517 lines (+387 / -130) across 6 files Reviewer: machichima Review duration: 53542m
    All Vouch review confidence checks passed
    Residual risk 0.46 = Change Risk (0.78) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.78 · 517 lines diff across 6 files
    0.78
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    40%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.374
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.078
    Real PR Conversation Timeline
    1 comments
    "Review active on #5207"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 40.9% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 77.9% (HIGH) · Higher = larger blast radius
    77.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 40.9% · Lower = rushed or shallow review
    40.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 46.0% · Moderate risk
    46.0%