Skip to content

Add a storage-only Kubernetes context lifecycle API #44

Closed as duplicate

Description

@moonlight16

Goal

Separate context storage from execution provisioning. Context Service creates and manages a logical context backed by a Kubernetes PVC. MOCA creates and manages the Sandbox that consumes it.

Part of #40. This issue maps to one Context Service PR.

Resource model

  • name is the user-facing context name, such as incident-reports.
  • contextId is a stable, system-generated identifier. Clients use it without knowing the Kubernetes PVC name.
  • The first storage backend is a Kubernetes PVC.
  • An authenticated service-to-service resolve operation returns the attachment descriptor MOCA needs: namespace, claim name, and supported access mode.
  • The attachment descriptor is not returned to ordinary client requests.

This first increment still creates PVCs. The difference is that Context Service creates only storage. It no longer couples that storage to a particular Sandbox implementation.

Scope

  • Add storage-only context create, get, and delete operations.
  • Create and label the managed PVC without creating a Sandbox resource.
  • Return the logical context record to clients without exposing the PVC name.
  • Provide an authenticated attachment-resolution operation for MOCA.
  • Preserve the current sandbox-pool API during migration.
  • Record the external owner reference supplied by the trusted MOCA integration.

Acceptance criteria

  • Creating a context creates its PVC but no Sandbox resource.
  • Client responses contain the context name and ID, but not the Kubernetes claim name.
  • Only an authenticated service integration can resolve the PVC attachment descriptor.
  • Get and delete operate through the context ID.
  • Deleting a managed context applies an explicit retention policy.
  • Existing sandbox-pool behavior remains compatible.
  • Unit and Kind tests verify creation, resolution, deletion, and cleanup.

Related work

Activity

  1. moonlight16 commented on Oct 1, 2026

    @moonlight16
    MemberAuthor

    This scope is now incorporated into #40 so the storage-only API has one issue mapped to one PR. Closing this duplicate before implementation begins.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions