Documentation ¶
Index ¶
- Constants
- Variables
- func Assignments(a volume.AttacherDettacher) func(*Driver) error
- func ConfigureKubernetesIfAvailable() func(*Driver) error
- func Endpoint(ep string) func(*Driver) error
- func Expander(s volume.Expander) func(*Driver) error
- func LogFmt(fmt logrus.Formatter) func(*Driver) error
- func LogLevel(s string) func(*Driver) error
- func LogOut(out io.Writer) func(*Driver) error
- func Mounter(m volume.Mounter) func(*Driver) error
- func Name(name string) func(*Driver) error
- func NodeID(nodeID string) func(*Driver) error
- func NodeInformer(n volume.NodeInformer) func(*Driver) error
- func Snapshots(s volume.SnapshotCreateDeleter) func(*Driver) error
- func Storage(s volume.CreateDeleter) func(*Driver) error
- func TopologyPrefix(prefix string) func(*Driver) error
- func VolumeStatter(s volume.VolumeStatter) func(*Driver) error
- type Driver
- func (d Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (d Driver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (d Driver) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (d Driver) ControllerModifyVolume(ctx context.Context, req *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
- func (d Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (d Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (d Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (d Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (d Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (d Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (d Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (d Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (d Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (d Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (d Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (d Driver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (d Driver) NodeGetCapabilities(context.Context, *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (d Driver) NodeGetInfo(ctx context.Context, _ *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (d Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (d Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (d Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (d Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (d Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (d Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (d Driver) Run() error
- func (d Driver) Stop() error
- func (d Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type PublishContext
- type VolumeContext
Constants ¶
const ( ParameterCsiPvcName = "csi.storage.k8s.io/pvc/name" ParameterCsiPvcNamespace = "csi.storage.k8s.io/pvc/namespace" )
const ( PublishContextMarker = linstor.ParameterNamespace + "/uses-publish-context" DevicePath = linstor.ParameterNamespace + "/device-path" )
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 ¶
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 LogFmt ¶ added in v0.8.0
LogFmt sets the format of the log outpout via the provided logrus.Formatter.
func LogLevel ¶ added in v0.8.0
LogLevel sets the logging intensity. Debug additionally reports the function from which the logger was called.
func LogOut ¶ added in v0.8.0
LogOut sets the driver to write logs to the provided io.writer instead of discarding logs.
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 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 // Embed for forward compatibility. csi.UnimplementedIdentityServer csi.UnimplementedControllerServer csi.UnimplementedNodeServer // contains filtered or unexported fields }
Driver fullfils CSI controller, node, and indentity server interfaces.
func (Driver) ControllerExpandVolume ¶ added in v0.8.0
func (d Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#controllerexpandvolume
func (Driver) ControllerGetCapabilities ¶
func (d Driver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#controllergetcapabilities
func (Driver) ControllerGetVolume ¶ added in v0.14.0
func (d Driver) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#controllergetvolume
func (Driver) ControllerModifyVolume ¶ added in v1.3.0
func (d Driver) ControllerModifyVolume(ctx context.Context, req *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
ControllerModifyVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#controllermodifyvolume
func (Driver) ControllerPublishVolume ¶
func (d Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#controllerpublishvolume
func (Driver) ControllerUnpublishVolume ¶
func (d Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#controllerunpublishvolume
func (Driver) CreateSnapshot ¶
func (d Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
CreateSnapshot https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#createsnapshot
func (Driver) CreateVolume ¶
func (d Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#createvolume
func (Driver) DeleteSnapshot ¶
func (d Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
DeleteSnapshot https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#deletesnapshot
func (Driver) DeleteVolume ¶
func (d Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#deletevolume
func (Driver) GetCapacity ¶
func (d Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
GetCapacity https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#getcapacity
func (Driver) GetPluginCapabilities ¶
func (d Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#getplugincapabilities
func (Driver) GetPluginInfo ¶
func (d Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#getplugininfo
func (Driver) ListSnapshots ¶
func (d Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
ListSnapshots https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#listsnapshots
func (Driver) ListVolumes ¶
func (d Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
ListVolumes https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#listvolumes
func (Driver) NodeExpandVolume ¶ added in v0.8.0
func (d Driver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
NodeExpandVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#nodeexpandvolume
func (Driver) NodeGetCapabilities ¶
func (d Driver) NodeGetCapabilities(context.Context, *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#nodegetcapabilities
func (Driver) NodeGetInfo ¶
func (d Driver) NodeGetInfo(ctx context.Context, _ *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
NodeGetInfo https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#nodegetinfo
func (Driver) NodeGetVolumeStats ¶
func (d Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
NodeGetVolumeStats https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#nodegetvolumestats
func (Driver) NodePublishVolume ¶
func (d Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#nodepublishvolume
func (Driver) NodeStageVolume ¶
func (d Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
NodeStageVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#nodestagevolume
func (Driver) NodeUnpublishVolume ¶
func (d Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#nodeunpublishvolume
func (Driver) NodeUnstageVolume ¶
func (d Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
NodeUnstageVolume https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#nodeunstagevolume
func (Driver) Probe ¶
func (d Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#probe
func (Driver) ValidateVolumeCapabilities ¶
func (d Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities https://github.com/container-storage-interface/spec/blob/v1.9.0/spec.md#validatevolumecapabilities
type PublishContext ¶ added in v1.6.1
type PublishContext struct {
DevicePath string
}
func PublishContextFromMap ¶ added in v1.6.1
func PublishContextFromMap(ctx map[string]string) *PublishContext
func (*PublishContext) ToMap ¶ added in v1.6.1
func (p *PublishContext) ToMap() map[string]string
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