Skip to content

CSI volume support: follow-up improvements - #1729

Open
anishgang wants to merge 5 commits into
agent-substrate:mainfrom
anishgang:fix-csi-followups
Open

anishgang wants to merge 5 commits into
agent-substrate:mainfrom
anishgang:fix-csi-followups

Conversation

@anishgang

@anishgang anishgang commented Sep 18, 2026

Copy link
Copy Markdown

Resolves #1077

This PR implements the follow up improvements from PR #552 across 5 commits:

  1. volume: factor out generic LookupPlugin helper: Deduplicates plugin lookup logic between cmd/ateapi and cmd/atelet.
  2. csi: harden CSIDriverConfig ControllerEndpoint validation: Adds OpenAPI regex/length constraints and runtime URI/port validation.
  3. volume/csi: query and cache driver capabilities at plugin init: Caches capabilities during plugin initialization and avoids calling unsupported endpoints (example: hostpath attach/stage).
  4. atelet: replace CSIDriverConfig shared informer with direct client: Replaces the cluster-wide shared informer watch with direct client Get cached per worker.
  5. volume: support configurable access modes and propagate PublishContext: Adds VolumeAccessMode enum and propagates PublishContext from ControllerPublishVolume to node mounts.

Testing

  • All repository unit tests passed (make test)
  • All linters and verifiers passed (make verify, kube-api-linter, metrics.sh)

Deduplicate volume plugin lookup logic across cmd/ateapi and cmd/atelet
by introducing internal/volume.LookupPlugin. Preserves gRPC NotFound
status codes when wrapping lookup failures.
Add OpenAPI regex and length constraints on ControllerEndpoint in the
CSIDriverConfig CRD and add runtime URI and port range validation in
the CSI client package.
Query ControllerGetCapabilities and NodeGetCapabilities once during
plugin initialization and cache the results. Guard attach, detach,
and staging operations against missing driver capabilities to avoid
unnecessary RPC overhead and Unimplemented errors.
Remove the SharedInformerFactory from atelet which ran a persistent
cluster-wide watch on CSIDriverConfig CRDs. Replace it with a direct
client-go Get cached in memory on first use.
Add VolumeAccessMode enum and PublishContext fields to external volume
protos. Propagate PublishContext from ControllerPublishVolume through the
control-plane actor record to worker node stage and mount operations,
and configure CSI volume capabilities according to the requested access mode.
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.

CSI volume support: follow-up improvements from PR #552

1 participant