Skip to content

πŸ› kubejob ignores sandbox env_allowlist β€” Job pods get zero allowlisted env (docs say they are copied in)Β #14691

Closed

Description

@clubanderson

What

docs/sandbox-isolation.md (Job runtime section) says: "Environment variables from the allowlist are copied in with the same credential-name filter Podman applies." That is true for the Podman launcher (crux/sandbox/sandbox.go:66 β†’ SanitizedEnv(os.Environ(), spec.EnvAllowlist, spec.Env)), but the Kubernetes Job launcher never looks at spec.EnvAllowlist: crux/kubejob/kubejob.go only serialises spec.Env (L408-413) plus env_from_secrets.

Net effect: a runtime: job kick gets no environment at all beyond env_from_secrets. In practice the in-Job claude CLI starts with no ANTHROPIC_BASE_URL/token and exits 1 with Not logged in Β· Please run /login (observed on the a1-vllm-spyre spoke, Job hive-kick-hive-deps-1793130444). Note the in-pod inference-translate proxy (127.0.0.1:18444) is also unreachable from a Job pod on another node, so even a correct allowlist copy of ANTHROPIC_BASE_URL would not help on its own β€” the Job runtime needs either a documented "bring your own model creds via env_from_secrets" contract, or a routable inference endpoint (Service for 18444) plus the allowlist copy.

Repro

  1. agent_sandbox.runtime: job, env_allowlist: [FOO], FOO=bar in the hive pod env.
  2. Kick β†’ kubectl get job <name> -o jsonpath='{.spec.template.spec.containers[0].env}' β†’ [].

Suggested fix (pick one, then make the doc match)

  • In kubejob.Launcher.Run, build env from sandbox.SanitizedEnv(os.Environ(), spec.EnvAllowlist, spec.Env) like the Podman path, or
  • Drop the sentence from the docs and add a worked example of env_from_secrets carrying ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN pointed at the gateway (that is the workaround now in use on a1: Secret hive-sandbox-model-creds).

Related: #14662 (scheduler_name), same spoke.

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 27, 2026
  2. hivecommons-hive commented on Oct 27, 2026

    @hivecommons-hive
    Contributor

    πŸ”’ Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  3. github-actions commented on Oct 27, 2026

    @github-actions
    Contributor

    @clubanderson this issue was closed by @hivecommons-hive[bot] as completed.

    If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it β€” check your running version against the fix before concluding the fix failed.

    If you are still seeing the problem, comment /reopen and it will be reopened for you β€” you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions