Documentation ¶
Overview ¶
Package driver provides the implementation of the CSI plugin.
It contains the gRPC server implementation of CSI specification.
Index ¶
- Constants
- Variables
- func GetVersionJSON() (string, error)
- func NewControllerServer(connector cloud.Interface) csi.ControllerServer
- func NewNodeServer(connector cloud.Interface, mounter mount.Interface, options *Options) csi.NodeServer
- type Interface
- type Mode
- type Options
- type Topology
- type VersionInfo
Constants ¶
View Source
const ( // DefaultCSIEndpoint is the default CSI endpoint for the driver. DefaultCSIEndpoint = "unix://tmp/csi.sock" DefaultMaxVolAttachLimit int64 = 256 )
constants for default command line flag values.
View Source
const ( // FSTypeExt2 represents the ext2 filesystem type. FSTypeExt2 = "ext2" // FSTypeExt3 represents the ext3 filesystem type. FSTypeExt3 = "ext3" // FSTypeExt4 represents the ext4 filesystem type. FSTypeExt4 = "ext4" // FSTypeXfs represents the xfs filesystem type. FSTypeXfs = "xfs" )
Filesystem types.
View Source
const ( ZoneKey = "topology." + DriverName + "/zone" HostKey = "topology." + DriverName + "/host" )
Topology keys.
View Source
const (
DiskOfferingKey = DriverName + "/disk-offering-id"
)
Volume parameters keys.
View Source
const DriverName = "csi.cloudstack.apache.org"
DriverName is the name of the CSI plugin.
Variables ¶
View Source
var ValidFSTypes = map[string]struct{}{
FSTypeExt2: {},
FSTypeExt3: {},
FSTypeExt4: {},
FSTypeXfs: {},
}
Functions ¶
func GetVersionJSON ¶ added in v0.6.0
func NewControllerServer ¶
func NewControllerServer(connector cloud.Interface) csi.ControllerServer
NewControllerServer creates a new Controller gRPC server.
func NewNodeServer ¶
func NewNodeServer(connector cloud.Interface, mounter mount.Interface, options *Options) csi.NodeServer
NewNodeServer creates a new Node gRPC server.
Types ¶
type Mode ¶ added in v0.6.0
type Mode string
Mode is the operating mode of the CSI driver.
const ( // ControllerMode is the mode that only starts the controller service. ControllerMode Mode = "controller" // NodeMode is the mode that only starts the node service. NodeMode Mode = "node" // AllMode is the mode that only starts both the controller and the node service. AllMode Mode = "all" )
Driver operating modes.
type Options ¶ added in v0.6.0
type Options struct { Mode Mode // Endpoint is the endpoint for the CSI driver server Endpoint string // CloudStackConfig is the path to the CloudStack configuration file CloudStackConfig string // NodeName is used to retrieve the node instance ID in case metadata lookup fails. NodeName string // VolumeAttachLimit specifies the value that shall be reported as "maximum number of attachable volumes" // in CSINode objects. It is similar to https://kubernetes.io/docs/concepts/storage/storage-limits/#custom-limits // which allowed administrators to specify custom volume limits by configuring the kube-scheduler. VolumeAttachLimit int64 }
Options contains options and configuration settings for the driver.
type Topology ¶
Topology represents CloudStack storage topology.
func NewTopology ¶
NewTopology converts a *csi.Topology to Topology.
type VersionInfo ¶ added in v0.6.0
type VersionInfo struct { DriverVersion string `json:"driverVersion"` GitCommit string `json:"gitCommit"` BuildDate string `json:"buildDate"` GoVersion string `json:"goVersion"` Compiler string `json:"compiler"` Platform string `json:"platform"` }
func GetVersion ¶ added in v0.6.0
func GetVersion() VersionInfo
Click to show internal directories.
Click to hide internal directories.