Skip to content

Default Kubernetes image volumes when supported - #156

Merged
bnavetta merged 2 commits into
mainfrom
factory/remote-3249-auto-image-volumes
Oct 19, 2026
Merged

bnavetta merged 2 commits into
mainfrom
factory/remote-3249-auto-image-volumes

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Automatically prefer native Kubernetes image volumes when backend.kubernetes.use_image_volumes is omitted, while honoring explicit opt-in and opt-out.

Linear: REMOTE-3249

Behavior

  • Preserve omitted, explicit true, and explicit false through YAML, runtime configuration, and Helm. The chart leaves the key unset by default.
  • In automatic mode, reuse the real namespaced startup Job to exercise image-volume support. Any failed or inconclusive probe selects the safe default: no image volumes, with the existing legacy preflight required before startup succeeds.
  • Explicit true still requires a successful image-volume preflight; explicit false skips that probe and uses the legacy copy path.
  • Select the loading path per sidecar: read-only sidecars use image volumes when enabled; writable sidecars use root init containers and writable emptyDir mounts. Mixed tasks work in both automatic and explicit-on mode.

Detection limits

API-server version, discovery, and dry-run do not prove admission and node-runtime support. The existing 15-second runtime probe remains the capability check, without extra cluster-scoped permissions. A successful probe proves only its selected node/runtime, not every node in a heterogeneous pool. Writable sidecars still require permission to run root init containers.

Validation

  • Mixed-sidecar regression failed before the fix and passed afterward through ExecuteTask; automatic fallback on an inconclusive API timeout is also covered.
  • go test . ./internal/config ./internal/worker -count=1 — passed.
  • go vet . ./internal/config ./internal/worker and go build ./... — passed.
  • golangci-lint run . ./internal/config ./internal/worker --concurrency 2 --timeout=5m — passed (v2.12.2).
  • Helm v4.1.3 lint and omitted/true/false rendering — passed on the unchanged chart.
  • Final gofmt and git diff --check — passed.
  • No live Kubernetes cluster was available; real mount/runtime behavior was not verified.

@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-staging-factory on this PR to send it follow-up work.

View run View conversation View origin

@warp-agent-staging
warp-agent-staging Bot marked this pull request as ready for review September 22, 2026 13:06
Comment thread .github/workflows/ci.yml Outdated
Comment thread internal/worker/kubernetes.go Outdated
@warp-agent-staging warp-agent-staging Bot added the factory:eng-factory-slim Label associated to the "eng-factory-slim" factory label Oct 19, 2026
Make use_image_volumes tri-state so omitted configuration probes real cluster support while preserving strict explicit opt-in and opt-out behavior. Fall back to the copy path for unsupported clusters and read-write sidecars in automatic mode.\n\nREMOTE-3249
@warp-agent-staging
warp-agent-staging Bot force-pushed the factory/remote-3249-auto-image-volumes branch from 7e85252 to d75709b Compare October 19, 2026 15:10
@warp-agent-staging
warp-agent-staging Bot marked this pull request as draft October 19, 2026 15:12

@warp-agent-staging warp-agent-staging Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Overview

The rebase preserves the PR's tri-state configuration and startup-Job probe while retaining main's metadata checks and upgrade guidance. The remaining detection policy needs a human decision.

Concerns

  • Important — ambiguous: internal/worker/kubernetes.go:901-910 selects legacy mode for the worker's lifetime after every probe error, including a 15-second scheduling timeout or registry/network failure. Supported clusters can therefore lose image volumes, or fail startup when the fallback requires disallowed root init containers; this is not evidence of unsupported runtime capability. I recommend falling back only for clear incompatibility and failing/retrying startup for inconclusive errors: should that replace the current best-effort fallback policy?

Verdict

Checks: build pass, affected-package tests pass, affected-package vet pass, Helm pass, CI pending, visual proof n/a.

Found: 0 critical, 1 important, 0 suggestions, 0 nits. Human decision needed; no approval or rejection.

Responding as eng-factory-slim: Open session · View in factory

@warp-agent-staging
warp-agent-staging Bot marked this pull request as ready for review October 19, 2026 16:50
@warp-agent-staging
warp-agent-staging Bot requested a review from bnavetta October 19, 2026 16:50
@bnavetta
bnavetta merged commit 7264014 into main Oct 19, 2026
8 checks passed
@bnavetta
bnavetta deleted the factory/remote-3249-auto-image-volumes branch October 19, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed factory:eng-factory-slim Label associated to the "eng-factory-slim" factory factory:foreman

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant