driver

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ParameterCsiPvcName      = "csi.storage.k8s.io/pvc/name"
	ParameterCsiPvcNamespace = "csi.storage.k8s.io/pvc/namespace"
)
View Source
const (
	VolumeContextMarker    = linstor.ParameterNamespace + "/uses-volume-context"
	MountOptions           = linstor.ParameterNamespace + "/mount-options"
	PostMountXfsOpts       = linstor.ParameterNamespace + "/post-mount-xfs-opts"
	RemoteAccessPolicyOpts = linstor.ParameterNamespace + "/remote-access-policy"
)

Variables

View Source
var Version = "UNKNOWN"

Version is set via ldflags configued in the Makefile.

Functions

func Assignments added in v0.8.0

func Assignments(a volume.AttacherDettacher) func(*Driver) error

Assignments configures the volume attachment service backend.

func ConfigureKubernetesIfAvailable added in v1.3.0

func ConfigureKubernetesIfAvailable() func(*Driver) error

func Endpoint added in v0.8.0

func Endpoint(ep string) func(*Driver) error

Endpoint configures the driver name.

func Expander added in v0.9.0

func Expander(s volume.Expander) func(*Driver) error

func LogFmt added in v0.8.0

func LogFmt(fmt logrus.Formatter) func(*Driver) error

LogFmt sets the format of the log outpout via the provided logrus.Formatter.

func LogLevel added in v0.8.0

func LogLevel(s string) func(*Driver) error

LogLevel sets the logging intensity. Debug additionally reports the function from which the logger was called.

func LogOut added in v0.8.0

func LogOut(out io.Writer) func(*Driver) error

LogOut sets the driver to write logs to the provided io.writer instead of discarding logs.

func Mounter added in v0.8.0

func Mounter(m volume.Mounter) func(*Driver) error

Mounter configures the volume mounting service backend.

func Name added in v0.8.0

func Name(name string) func(*Driver) error

Name configures the driver name.

func NodeID added in v0.8.0

func NodeID(nodeID string) func(*Driver) error

NodeID configures the driver node ID.

func NodeInformer added in v0.10.0

func NodeInformer(n volume.NodeInformer) func(*Driver) error

func Snapshots added in v0.8.0

func Snapshots(s volume.SnapshotCreateDeleter) func(*Driver) error

Snapshots configures the volume snapshot service backend.

func Storage added in v0.8.0

func Storage(s volume.CreateDeleter) func(*Driver) error

Storage configures the volume service backend.

func TopologyPrefix added in v1.1.0

func TopologyPrefix(prefix string) func(*Driver) error

func VolumeStatter added in v0.8.0

func VolumeStatter(s volume.VolumeStatter) func(*Driver) error

VolumeStatter configures the volume stats service backend.

Types

type Driver

type Driver struct {
	Storage       volume.CreateDeleter
	Assignments   volume.AttacherDettacher
	Mounter       volume.Mounter
	Snapshots     volume.SnapshotCreateDeleter
	VolumeStatter volume.VolumeStatter
	Expander      volume.Expander
	NodeInformer  volume.NodeInformer
	// contains filtered or unexported fields
}

Driver fullfils CSI controller, node, and indentity server interfaces.

func NewDriver

func NewDriver(options ...func(*Driver) error) (*Driver, error)

NewDriver builds up a driver.

func (Driver) Run

func (d Driver) Run() error

Run the server.

func (Driver) Stop

func (d Driver) Stop() error

Stop the server.

type VolumeContext added in v0.16.0

type VolumeContext struct {
	MountOptions        []string
	PostMountXfsOptions string
	RemoteAccessPolicy  volume.RemoteAccessPolicy
}

VolumeContext stores the context parameters required to mount a volume.

func NewVolumeContext added in v0.16.0

func NewVolumeContext() *VolumeContext

NewVolumeContext creates a new default volume context, which does not specify any fancy mkfs/mount/post-mount options

func VolumeContextFromMap added in v0.16.0

func VolumeContextFromMap(ctx map[string]string) (*VolumeContext, error)

func VolumeContextFromParameters added in v0.16.0

func VolumeContextFromParameters(params *volume.Parameters) *VolumeContext

func (*VolumeContext) ToMap added in v0.16.0

func (v *VolumeContext) ToMap() (map[string]string, error)

Jump to

Keyboard shortcuts

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