Skip to content

fix: add openshell.io/sandbox-id annotation to sandbox pods#9

Merged
pdettori merged 1 commit into
mvpfrom
fix/sandbox-id-annotation
Jun 4, 2026
Merged

fix: add openshell.io/sandbox-id annotation to sandbox pods#9
pdettori merged 1 commit into
mvpfrom
fix/sandbox-id-annotation

Conversation

@pdettori
Copy link
Copy Markdown

@pdettori pdettori commented Jun 4, 2026

Summary

Add openshell.io/sandbox-id annotation to sandbox pod metadata so the gateway
can look up the sandbox identity during IssueSandboxToken.

Problem

The gateway's K8s SA authenticator (openshell-server/src/auth/k8s_sa.rs) expects:

  • Annotation openshell.io/sandbox-id (domain: openshell.io)

The driver was only setting:

  • Label openshell.ai/sandbox-id (domain: openshell.ai)

This caused IssueSandboxToken to fail after the TokenReview succeeded (rc.3).

Changes

  • Add annotationSandboxID = "openshell.io/sandbox-id" constant
  • Set the annotation on podTemplate.metadata.annotations
  • Keep existing label for backwards compat
  • Add test TestBuildSandboxSpec_Annotations

Fixes: kagenti/kagenti#1815

Test plan

  • Unit tests pass (go test ./...)
  • Kind full test with kagenti PR #1814

Assisted-By: Claude Code

The gateway's K8s SA authenticator looks up the sandbox identity from
annotation openshell.io/sandbox-id on the pod, not the label
openshell.ai/sandbox-id. Add the annotation to podTemplate metadata
so IssueSandboxToken succeeds after TokenReview.

The existing label is kept for backwards compatibility.

Fixes: kagenti/kagenti#1815

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
@pdettori pdettori merged commit 64d8406 into mvp Jun 4, 2026
4 checks passed
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.

1 participant