csi

package
v0.0.0-...-ef941a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MbToBytes           = int64(1024 * 1024)
	GbToBytes           = int64(1024 * 1024 * 1024)
	DefaultDiskSizeInGb = int64(1)
)
View Source
const (
	BusTypeParameter        = "busType"
	BusSubTypeParameter     = "busSubType"
	StorageProfileParameter = "storageProfile"
	ZoneNameParameter       = "zoneName"
	FileSystemParameter     = "filesystem"
	EphemeralVolumeContext  = "csi.storage.k8s.io/ephemeral"

	DiskIDAttribute     = "diskID"
	VMFullNameAttribute = "vmID"
	DiskUUIDAttribute   = "diskUUID"
	FileSystemAttribute = "filesystem"
)
View Source
const (
	DevDiskPath          = "/dev/disk/by-path"
	ScsiHostPath         = "/sys/class/scsi_host"
	HostNameRegexPattern = "^host[0-9]+"

	ScsiBlockPathPrefix = "/sys/class/block"
	ScsiBlockPathSuffix = "device/rescan"
)
View Source
const (
	// Name is the name of this CSI plugin.
	Name = "named-disk.csi.cloud-director.vmware.com"
)

Variables

View Source
var (
	VolumeCapabilityAccessModesList = []csi.VolumeCapability_AccessMode_Mode{
		csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER,
		csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY,
		csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY,
		csi.VolumeCapability_AccessMode_MULTI_NODE_SINGLE_WRITER,
		csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER,
	}

	// VolumeCapabilityAccessModesStringMap is a cache for available VolumeCapabilityAccessModesList. This is later
	// referenced in CreateVolume of the controller service.
	VolumeCapabilityAccessModesStringMap = make(map[string]bool)
)
View Source
var (
	// BusTypesFromValues is a map of different possible BusTypes from id to string
	BusTypesFromValues = map[string]string{
		"5":  "IDE",
		"6":  "SCSI",
		"20": "SATA",
	}
)

Functions

func IsBlockVolume

func IsBlockVolume(volumeCapabilities []*csi.VolumeCapability) (bool, error)

func NewControllerService

func NewControllerService(driver *VCDDriver, vcdClient *vcdsdk.Client, clusterID string, vAppName string,
	isZoneEnabledCluster bool, zm *vcdsdk.ZoneMap) csi.ControllerServer

NewControllerService creates a controllerService

func NewIdentityServer

func NewIdentityServer(driver *VCDDriver) csi.IdentityServer

NewIdentityServer will create a new csi.IdentityServer with driver

func NewNodeService

func NewNodeService(driver *VCDDriver, nodeID string) csi.NodeServer

NewNodeService creates and returns a NodeService struct.

Types

type VCDDriver

type VCDDriver struct {
	// contains filtered or unexported fields
}

VCDDriver is the main controller of the csi-plugin

func NewDriver

func NewDriver(nodeID string, endpoint string) (*VCDDriver, error)

NewDriver creates new VCDDriver

func (*VCDDriver) Run

func (d *VCDDriver) Run() error

Run will start driver gRPC server to communicated with Kubernetes and register controller, node and identity servers

func (*VCDDriver) Setup

func (d *VCDDriver) Setup(diskManager *vcdcsiclient.DiskManager, VAppName string, nodeID string, upgradeRde bool,
	isZoneEnabledCluster bool, zm *vcdsdk.ZoneMap) error

Setup will setup the driver and add controller, node and identity servers

func (*VCDDriver) Stop

func (d *VCDDriver) Stop()

Stop will stop the grpc server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL