[Feature][History Server] Make the collector image configurable on the operator #5207
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
machichima
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 twoconsequences:
KubeRay upgrade, and the docs currently point people at a
nightlytag.quay.iohave no way to point all of theirRayClusters 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.imageon the RayCluster, if set.2. The image configured on the operator: the
--collector-imageflag, thecollectorImagefieldof the operator configuration file, or the
collectorImagevalue of thekuberay-operatorHelm chart.
3.
quay.io/kuberay/collectorwith the tag matching the KubeRay version (nightlyon master, therelease tag on a release).
To make (1) optional,
collectorOptions.imageis no longer rejected when empty; the RayClusterthen inherits the operator-level image. The field was already
+optionalin the CRD, so there isno CRD change. This only relaxes validation, so existing manifests keep working unchanged.
Changes:
ray-operator: newcollectorImagefield on theConfigurationAPI with defaulting, thematching
--collector-imageflag, and the value plumbed throughRayClusterReconcilerOptionsinto the head and worker Pod builders.
ray-operator:validateCollectorOptionsno longer requirescollectorOptions.image.helm-chart/kuberay-operator: newcollectorImagevalue, wired into both the flag and theoperator configuration ConfigMap paths.
ray-cluster.historyserver.yamlsample no longer hardcode a collector image, anddescribe how to configure it on the operator.
Example:
Related issue number
Part of the History Server collector work in #4274.
Labels
<!-- Please add the appropriate labels to this PR. -->
doc-updates-requiredlabel.breaking-changelabel.This adds a user-facing operator flag and Helm value; please add
doc-updates-requiredif therelease docs should mention it as well. There are no breaking changes: the new configuration is
optional and validation is only relaxed.
Checks
- [x] Unit tests
New tests:
TestSetDefaultCollectorImage(controllers/ray/common): the injected collector containerinherits the operator image only when the RayCluster leaves it empty.
TestBuildPodsCollectorImage(controllers/ray): head and worker Pods fall back to theoperator image, and the RayCluster value takes precedence.
Test_decodeConfigcase forcollectorImage, plus the defaulting expectations.TestValidateCollectorOptions: a missing image is now valid.kuberay-operatorchart tests for both the--collector-imageflag and the ConfigMap field,including the "not set" cases.
Locally:
go build ./...,go vet ./...,go testfor theray-operatorpackages,helm unittest helm-chart/kuberay-operator --strict(73/73) and the repositorypre-commithooks (golangci-lint, kubeconform, markdownlint, yamlfmt, helm-docs) all pass. The two
envtest-based suites (
controllers/rayTestAPIsandpkg/webhooks/v1) were not run locallybecause the envtest assets are not installed in my environment; they are left to CI.