Documentation
¶
Index ¶
- Constants
- Variables
- func AggregateGroupSnapshot(id string, snapshots ...*volume.Snapshot) *csi.VolumeGroupSnapshot
- func Assignments(a volume.AttacherDettacher) func(*Driver) error
- func ConfigureKubernetesIfAvailable() func(*Driver) error
- func ConfigureRWX(namespace, reactorConfigMap string) 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 ReconcileVolumeSnapshotClass(ctx context.Context, client dynamic.Interface, ...) error
- func ResyncAfter(resyncAfter time.Duration) 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) CreateVolumeGroupSnapshot(ctx context.Context, req *csi.CreateVolumeGroupSnapshotRequest) (*csi.CreateVolumeGroupSnapshotResponse, 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) DeleteVolumeGroupSnapshot(ctx context.Context, req *csi.DeleteVolumeGroupSnapshotRequest) (*csi.DeleteVolumeGroupSnapshotResponse, 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) GetVolumeGroupSnapshot(ctx context.Context, req *csi.GetVolumeGroupSnapshotRequest) (*csi.GetVolumeGroupSnapshotResponse, error)
- func (d Driver) GroupControllerGetCapabilities(ctx context.Context, in *csi.GroupControllerGetCapabilitiesRequest) (*csi.GroupControllerGetCapabilitiesResponse, 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 NfsExporter
- type NfsMetadata
- type PromoterConfig
- type PublishContext
- type ReactorConfig
- type ResourceConfig
- 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" FsType = linstor.ParameterNamespace + "/fs-type" )
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" NfsExport = linstor.ParameterNamespace + "/nfs-export" )
Variables ¶
var Version = "UNKNOWN"
Version is set via ldflags configued in the Makefile.
Functions ¶
func AggregateGroupSnapshot ¶ added in v1.10.0
func AggregateGroupSnapshot(id string, snapshots ...*volume.Snapshot) *csi.VolumeGroupSnapshot
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 ConfigureRWX ¶ added in v1.10.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 ReconcileVolumeSnapshotClass ¶ added in v1.8.0
func ResyncAfter ¶ added in v1.8.0
ResyncAfter sets the interval in which certain resources should be synced.
Currently, this only applies to VolumeSnapshotClassses. Set to 0 to disable syncing.
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
csi.UnimplementedGroupControllerServer
// 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)
func (Driver) CreateVolumeGroupSnapshot ¶ added in v1.10.0
func (d Driver) CreateVolumeGroupSnapshot(ctx context.Context, req *csi.CreateVolumeGroupSnapshotRequest) (*csi.CreateVolumeGroupSnapshotResponse, error)
CreateVolumeGroupSnapshot https://github.com/container-storage-interface/spec/blob/v1.11.0/spec.md#createvolumegroupsnapshot
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)
func (Driver) DeleteVolumeGroupSnapshot ¶ added in v1.10.0
func (d Driver) DeleteVolumeGroupSnapshot(ctx context.Context, req *csi.DeleteVolumeGroupSnapshotRequest) (*csi.DeleteVolumeGroupSnapshotResponse, error)
DeleteVolumeGroupSnapshot https://github.com/container-storage-interface/spec/blob/v1.11.0/spec.md#deletevolumegroupsnapshot
func (Driver) GetCapacity ¶
func (d Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
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) GetVolumeGroupSnapshot ¶ added in v1.10.0
func (d Driver) GetVolumeGroupSnapshot(ctx context.Context, req *csi.GetVolumeGroupSnapshotRequest) (*csi.GetVolumeGroupSnapshotResponse, error)
GetVolumeGroupSnapshot https://github.com/container-storage-interface/spec/blob/v1.11.0/spec.md#getvolumegroupsnapshot
func (Driver) GroupControllerGetCapabilities ¶ added in v1.10.0
func (d Driver) GroupControllerGetCapabilities(ctx context.Context, in *csi.GroupControllerGetCapabilitiesRequest) (*csi.GroupControllerGetCapabilitiesResponse, error)
GroupControllerGetCapabilities https://github.com/container-storage-interface/spec/blob/v1.11.0/spec.md#groupcontrollergetcapabilities
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)
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)
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)
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 NfsExporter ¶ added in v1.10.0
type NfsExporter struct {
// contains filtered or unexported fields
}
func (*NfsExporter) Enabled ¶ added in v1.10.0
func (n *NfsExporter) Enabled() bool
type NfsMetadata ¶ added in v1.10.0
type PromoterConfig ¶ added in v1.10.0
type PromoterConfig struct {
ResourceConfig map[string]ResourceConfig `toml:"resources"`
}
type PublishContext ¶ added in v1.6.1
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 ReactorConfig ¶ added in v1.10.0
type ReactorConfig struct {
Promoters []PromoterConfig `toml:"promoter"`
}
type ResourceConfig ¶ added in v1.10.0
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