Skip to content

refactor(server): decouple K8s ServiceAccount bootstrap from selected compute driver config #2023

Description

@elezar

Description

K8s ServiceAccount bootstrap currently derives its namespace and service-account settings from [openshell.drivers.kubernetes] whenever the gateway has gateway_jwt configured and detects that it is running in-cluster.

That assumes the Kubernetes compute driver is the source of sandbox bootstrap identity configuration. With named remote compute drivers, an in-cluster gateway may select a non-Kubernetes driver but still hit the bootstrap path and require [openshell.drivers.kubernetes].

Context

PR #1974 normalizes selected compute-driver config acquisition so unselected driver tables are no longer validated during startup. That makes the ServiceAccount bootstrap path stand out as a separate consumer of Kubernetes driver config, outside the selected driver acquisition flow.

Related issues:

Proposed Direction

Make K8s ServiceAccount bootstrap configuration explicit and independent from the selected compute driver, or only enable the current Kubernetes-driver-derived bootstrap behavior when Kubernetes is the selected driver.

The implementation should decide how an in-cluster gateway using a named remote driver configures or disables ServiceAccount bootstrap without requiring an unrelated [openshell.drivers.kubernetes] table.

Definition of Done

  • Define the ownership model for ServiceAccount bootstrap namespace and service-account settings.
  • Avoid requiring [openshell.drivers.kubernetes] when the selected compute driver is a named remote driver.
  • Preserve current Kubernetes-driver behavior for in-cluster gateways that rely on ServiceAccount bootstrap.
  • Add tests for Kubernetes selected, remote driver selected in-cluster with bootstrap enabled, and remote driver selected with bootstrap disabled or explicitly configured.
  • Update gateway configuration documentation if new config fields are introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions