Skip to content

feat(gateway): define resource admission at the gateway level with a typed policy #5941

Backlog

Description

@elezar

User Story

I operate the gateway with Docker, Podman or VM compute drivers and configure resource admission (allow_driver_config and resource_admission) for them. I directly encountered, while reviewing the launched-driver contract, that these gateway-level rules live in each driver's own table and travel to drivers as JSON text. This affects how clearly operators configure admission and how safely the protocol carries it.

Problem Statement

allow_driver_config and resource_admission are one shared policy type (DriverAdmissionConfig in openshell-core), enforced by the gateway and re-checked by each driver. It is configured under [openshell.drivers.<name>], so an operator repeats it per driver. The gateway pulls the two keys out of every driver table, and the launcher sends them to the driver as a JSON string (resource_admission_policy_json in Configure). The driver reports its effective policy back in GetCapabilities as another JSON string (resource_admission_policy, prefixed v1:), which the gateway compares with its own.

Impact / Why This Matters

The same policy is written in several places and carried as untyped text in two protocols. A typo or a format change is caught only at parse time, and the placement suggests a per-backend setting when it is a gateway rule.

Desired Workflow

Operators define resource admission once, under the gateway table (for example [openshell.gateway.resource_admission]). The driver-table location keeps working as a deprecated alias with a warning, as driver_dir does. The gateway sends the policy to launched drivers in a typed resource_admission_policy message in Configure, and drivers report it in GetCapabilities as the same typed message, so the gateway compares messages. The JSON fields are deprecated for one protocol version and then removed. Kubernetes and external drivers keep working through the existing capability handshake.

Acceptance Criteria

  • A gateway-level admission table is documented and takes precedence over the deprecated driver-table keys.
  • Configure and GetCapabilities carry a typed policy. resource_admission_policy_json is deprecated for one protocol version and then removed.
  • The gateway rejects a driver whose reported policy differs from its own, as it does today.
  • Tests cover the legacy driver-table location, the new location and the typed round trip.

Related: #5384, #5385. Deferred from the launcher PR.

Activity

  1. added
    area:drivers
    on Nov 24, 2026
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

    area:drivers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions