Skip to content

refactor(driver-kubernetes): depend on the driver SDK instead of core - #5511

Open
elezar wants to merge 1 commit into
feat/5456-write-driver-contract-files/elezarfrom
claude/k8s-driver-sdk-ff39cd
Open

elezar wants to merge 1 commit into
feat/5456-write-driver-contract-files/elezarfrom
claude/k8s-driver-sdk-ff39cd

Conversation

@elezar

@elezar elezar commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Move the in-tree Kubernetes driver onto openshell-driver-sdk and openshell-driver-contract. Only imports and Cargo dependencies change; there is no behaviour change.

Related Issue

Part of #5456. Stacked on #5519 (base is feat/5456-write-driver-contract-files/elezar); the launch credentials change (#5510) is stacked on this one because both touch the Kubernetes driver. Retarget as the PRs below merge.

Changes

  • Drop the driver's direct openshell-isolation-interface, openshell-sandbox-backend and openshell-policy dependencies.
  • Add new_route_handle next to validate_route_handle in the contract crate.
  • openshell-core stays a direct dependency only for AppListenerConfig and DynamicStringAllowlist. It and openshell-sandbox-backend remain in the driver's tree through openshell-supervisor-control.

Release Notes

None.

Testing

  • Checks appropriate to the affected code and behavior pass
    • fmt, clippy, workspace tests, rust:deny:policy, buf lint and buf breaking pass at this tip. The openshell-driver-vm tests were not run to completion: they need mke2fs, which was unavailable locally.
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)
    • Not run on this version.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)
    • The tmachine ubuntu-k3s end-to-end environment was not run; the change touches only imports and dependencies.

@elezar elezar added the area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. label Nov 12, 2026
@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 12, 2026
@elezar
elezar changed the base branch from refactor/5456-driver-contract-types/elezar to feat/5456-write-driver-contract-files/elezar November 12, 2026 12:35
@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from 87ddc89 to 2dbc437 Compare November 12, 2026 12:38
@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from 2dbc437 to 3123e8d Compare November 12, 2026 12:50
@elezar

elezar commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

This branch does not yet include 2ed8cec (docs(proto): point the launch credentials docs at sandbox_runtime.proto), the new head of #5510. As a result, proto/README.md and proto/launch_credentials.proto here still refer to driver_contract.proto. Rebasing the stack onto the current #5510 head picks up the fix.

@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from 3123e8d to 4bdcc9e Compare November 12, 2026 13:22
@elezar elezar added the test:e2e Requires end-to-end coverage label Nov 12, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied for 4bdcc9e. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from 4bdcc9e to 05ee531 Compare November 12, 2026 14:26
Base automatically changed from feat/5456-write-driver-contract-files/elezar to feat/5456-typed-launch-authentication/elezar November 12, 2026 15:25
@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from 05ee531 to c4db82b Compare November 12, 2026 15:25
@elezar
elezar changed the base branch from feat/5456-typed-launch-authentication/elezar to feat/5456-write-driver-contract-files/elezar November 12, 2026 16:18
@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from c4db82b to 964436e Compare November 12, 2026 16:18
@@ -22,6 +22,12 @@ pub const MIN_ROUTE_HANDLE_LEN: usize = 16;
/// Longest accepted route handle, in bytes.
pub const MAX_ROUTE_HANDLE_LEN: usize = 64;

/// Generate a fresh opaque route handle for one runtime generation.
#[must_use]
pub fn new_route_handle() -> String {

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.

This leaves two copies of new_route_handle. Could sandbox-backend/runtime_routed.rs re-export this one like it does validate_route_handle, and drop its own copy?

openshell-core = { path = "../openshell-core", default-features = false, features = ["jwt", "otel", "clap"] }
openshell-isolation-interface = { path = "../openshell-isolation-interface" }
openshell-sandbox-backend = { path = "../openshell-sandbox-backend" }
openshell-core = { path = "../openshell-core", default-features = false }

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.

Core drops jwt/otel/clap here. Intended? Works today since the SDK enables them.

pub fn capabilities(&self) -> Result<GetCapabilitiesResponse, String> {
Ok(GetCapabilitiesResponse {
resource_admission_policy: openshell_core::resource_admission::DriverAdmissionConfig {
resource_admission_policy: openshell_driver_sdk::resource_admission::DriverAdmissionConfig {

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.

nit: a few use lines would shorten these long openshell_driver_sdk::... paths.

@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from 964436e to 1b2fdc6 Compare November 13, 2026 13:24
@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from 1b2fdc6 to f099a71 Compare November 13, 2026 13:39
@purp purp added topic:architecture System design, component boundaries, data/control flow, architectural decisions, and RFCs. topic:extensions Extension APIs and integration points, consistent design, and external use cases. topic:kubernetes Kubernetes operators, CRDs, deployment controllers, and native Kubernetes API integration. labels Nov 15, 2026
@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from f099a71 to 49cd255 Compare November 16, 2026 12:40
Repoint the Kubernetes driver at openshell-driver-sdk and
openshell-driver-contract and drop its direct openshell-isolation-interface,
openshell-sandbox-backend and openshell-policy dependencies. Add
new_route_handle next to validate_route_handle in the contract crate.
openshell-core stays only for AppListenerConfig and DynamicStringAllowlist.

Part of #5456

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar
elezar force-pushed the claude/k8s-driver-sdk-ff39cd branch from 49cd255 to f48c382 Compare November 16, 2026 15:29

This branch has not been deployed

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

Labels

area:drivers Compute and secret drivers, host OS/architecture support, backend isolation, and lifecycle. state:accepted A maintainer decided OpenShell should pursue this issue test:e2e Requires end-to-end coverage topic:architecture System design, component boundaries, data/control flow, architectural decisions, and RFCs. topic:extensions Extension APIs and integration points, consistent design, and external use cases. topic:kubernetes Kubernetes operators, CRDs, deployment controllers, and native Kubernetes API integration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants