File: doc.go

package info (click to toggle)
docker.io 26.1.5%2Bdfsg1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 68,576 kB
  • sloc: sh: 5,748; makefile: 912; ansic: 664; asm: 228; python: 162
file content (29 lines) | stat: -rw-r--r-- 1,178 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package csi

// The `csi` package contains code for managing Swarmkit Cluster Volumes,
// which are powered by CSI drivers.
//
// This package stands separately from other manager components because of the
// unique nature of volumes. Volumes need to be allocated before they can be
// used, but the availability of a volume also imposes a scheduling constraint
// on the node. Further, the CSI lifecycle requires many different RPC calls at
// many points in the volume's life, which brings it out of the purview of any
// one component.
//
// In an ideal world, this package would live wholely within the allocator
// package, but the allocator is very fragile, and modifying it is more trouble
// than it's worth.

// Volume Lifecycle in Swarm
//
// Creation
//
// When a volume is created, the first thing the allocator does is contact the
// relevant CSI plugin in order to ensure that the volume is created, and to
// retrieve the associated volume ID. Volumes are always created when the
// swarmkit object is created, as opposed to being created when demanded by a
// Service.
//
// Assignment
//
// After a volume has been created, it may be used by one or more Tasks.