Skip to content

racer: require pods to name their ClusterCache - #976

Merged
Jordan Olshevski (jveski) merged 2 commits into
mainfrom
racer-require-cache-name
Oct 22, 2026
Merged

Jordan Olshevski (jveski) merged 2 commits into
mainfrom
racer-require-cache-name

Conversation

@jveski

@jveski Jordan Olshevski (jveski) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Removes the implicit racer-object default ClusterCache name. Pods that opt in to the racer-object sidecar must now set the racer.unbounded-cloud.io/object-cache annotation, and the injector webhook denies them if it is missing. racer-object also fails at startup when --cache is not set. This stops a pod from silently attaching to a cache that happens to be named racer-object. Docs are updated to match.

Remove the implicit "racer-object" default ClusterCache name.

The sidecar injector now denies opted-in pods that do not set the
racer.unbounded-cloud.io/object-cache annotation, and racer-object
fails at startup when --cache is not set. A pod can no longer attach
to a cache it did not ask for just because one happens to be named
racer-object.
Update the racer-object reference and the Azure Blob cache guide so
pods always set racer.unbounded-cloud.io/object-cache and --cache has
no default.

Copilot AI 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.

🟢 Approval recommended

Static review found no blocking issues; validation, regression coverage, and documentation consistently enforce explicit cache selection.

No open issues 🎉

What changed in this PR

Removes the implicit racer-object ClusterCache default so workloads must explicitly select their cache, preventing accidental attachment to an unrelated cache.

Changes:

  • Requires object-cache for sidecar injection and --cache for racer-object startup.
  • Adds missing-cache regression cases and updates existing tests to specify a cache.
  • Updates reference documentation and Azure Blob examples to show explicit cache selection.
File Description
internal/​racer/​injector/​injector.go Rejects missing cache annotations instead of applying a default.
internal/​racer/​injector/​injector_test.go Covers missing-cache denial and updates pod fixtures.
docs/​content/​reference/​racer-object.md Documents required cache selection and updates the example.
docs/​content/​guides/​azure-blob-cache.md Adds the required cache annotation to deployment instructions.
cmd/​racer-object/​main.go Requires an explicit, nonempty --cache value.
cmd/​racer-object/​main_test.go Tests required cache selection and updates command arguments.
cmd/​racer-object/​azure_test.go Supplies explicit cache arguments in provider tests.

Review effort: Balanced

@jveski
Jordan Olshevski (jveski) marked this pull request as ready for review October 22, 2026 15:05
@jveski
Jordan Olshevski (jveski) requested a review from a team October 22, 2026 15:05
@jveski
Jordan Olshevski (jveski) added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 5422431 Oct 22, 2026
36 checks passed
@jveski
Jordan Olshevski (jveski) deleted the racer-require-cache-name branch October 22, 2026 17:08
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.

3 participants