Enable CSI based external volumes for agents - #552
Conversation
c447f89 to
f07fb92
Compare
Michelle Au (msau42)
left a comment
There was a problem hiding this comment.
Is there a way to squash the dynamic plugin registration commit with the earlier commits that used a binary flag? It would probably be less confusing for other reviewers that go commit by commit because the binary flag changes get completely replaced later on.
Also in the PR description can you provide a high level summary of the driver registration approach?
Benjamin Elder (BenTheElder)
left a comment
There was a problem hiding this comment.
General comment: Avoid unpinned external references. They're a security risk and they make tests etc unreproducible.
- container images (refer to by @ sha256 digest)
- git repos (pin a git commit by hash or find an alternative)
- install manifests (consider e.g. checking in a copy under a third_party directory)
f07fb92 to
2bc2eed
Compare
3cbbf55 to
8cc2997
Compare
a9df0ea to
7291838
Compare
Michelle Au (msau42)
left a comment
There was a problem hiding this comment.
Can you also update the PR description to give a high level overview of the CSI driver registration and communication approach?
| DriverName string `json:"driverName"` | ||
|
|
||
| // ControllerEndpoint is the gRPC endpoint for the CSI Controller service. | ||
| // Must be a valid URI (e.g. unix:///var/run/csi.sock or dns:///csi-service:9000). |
There was a problem hiding this comment.
I would say remove it for now and we can consider adding it back if we need it.
| STATUS_DELETING = 3; | ||
| } | ||
| Status status = 4; | ||
| // volume_context contains metadata returned by the CSI driver during volume |
There was a problem hiding this comment.
Does the CSI spec have any restrictions on syntax that we can add validation on?
There was a problem hiding this comment.
IIUC, volume context isn't really standardized amongsts drivers, so I'm not really sure what validation we could enforce.
8931618 to
da93c1f
Compare
b850ccd to
23d7382
Compare
|
PR lgtm, just waiting on tests to run. Have one minor nit, I am fine fixing it in a followup. |
| } | ||
|
|
||
| // StagingDirPrefix returns the prefix directory for staging CSI volumes. | ||
| func StagingDirPrefix() string { |
There was a problem hiding this comment.
nit, can be done in a followup: maybe call it "CSIStagingDirPrefix"
23d7382 to
c9777b4
Compare
CONV=a6947013-0eab-49f2-9960-11d98ee43dbf
8f4c001
into
agent-substrate:main
#232
Integrate the with the volume interface created in #405, to enable CSI managed external volumes throughout the agent lifecycle.
CSI driver registration in Substrate is managed dynamically via the CSIDriverConfig CRD, which allows the system to discover and integrate with various CSI drivers on-demand. To support central
control-plane operations (such as volume provisioning), the driver must expose its Controller service over a network port (gRPC over TCP or DNS) which ateapi dynamically resolves from the CRD. For node-
level operations (such as volume mounting), the atelet agent on each worker node bypasses the network and connects directly to the driver's Node service using a Unix domain socket mounted from the
Kubelet plugins directory.
Support for secure connection with the controller will be added in a follow-up PR.