Documentation ¶
Index ¶
- Variables
- type ControllerServer
- func (cs *ControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (cs *ControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (cs *ControllerServer) DeleteLegacyVolume(ctx context.Context, req *csi.DeleteVolumeRequest, cr *util.Credentials) (*csi.DeleteVolumeResponse, error)
- func (cs *ControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (cs *ControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type Driver
- type ErrImageNotFound
- type ErrInvalidVolID
- type ErrMissingStash
- type ErrSnapNotFound
- type ErrVolNameConflict
- type IdentityServer
- type NodeServer
- func (ns *NodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (ns *NodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (ns *NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (ns *NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (ns *NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( // CSIInstanceID is the instance ID that is unique to an instance of CSI, used when sharing // ceph clusters across CSI instances, to differentiate omap names per CSI instance CSIInstanceID = "default" )
Functions ¶
This section is empty.
Types ¶
type ControllerServer ¶
type ControllerServer struct { *csicommon.DefaultControllerServer MetadataStore util.CachePersister // A map storing all volumes with ongoing operations so that additional operations // for that same volume (as defined by VolumeID/volume name) return an Aborted error VolumeLocks *util.VolumeLocks // A map storing all volumes with ongoing operations so that additional operations // for that same snapshot (as defined by SnapshotID/snapshot name) return an Aborted error SnapshotLocks *util.VolumeLocks }
ControllerServer struct of rbd CSI driver with supported methods of CSI controller server spec.
func NewControllerServer ¶
func NewControllerServer(d *csicommon.CSIDriver, cachePersister util.CachePersister) *ControllerServer
NewControllerServer initialize a controller server for rbd CSI driver
func (*ControllerServer) ControllerExpandVolume ¶
func (cs *ControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume expand RBD Volumes on demand based on resizer request
func (*ControllerServer) CreateSnapshot ¶
func (cs *ControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
CreateSnapshot creates the snapshot in backend and stores metadata in store nolint: gocyclo
func (*ControllerServer) CreateVolume ¶
func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume creates the volume in backend
func (*ControllerServer) DeleteLegacyVolume ¶
func (cs *ControllerServer) DeleteLegacyVolume(ctx context.Context, req *csi.DeleteVolumeRequest, cr *util.Credentials) (*csi.DeleteVolumeResponse, error)
DeleteLegacyVolume deletes a volume provisioned using version 1.0.0 of the plugin
func (*ControllerServer) DeleteSnapshot ¶
func (cs *ControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
DeleteSnapshot deletes the snapshot in backend and removes the snapshot metadata from store
func (*ControllerServer) DeleteVolume ¶
func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume deletes the volume in backend and removes the volume metadata from store
func (*ControllerServer) ValidateVolumeCapabilities ¶
func (cs *ControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities checks whether the volume capabilities requested are supported.
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver contains the default identity,node and controller struct
type ErrImageNotFound ¶
type ErrImageNotFound struct {
// contains filtered or unexported fields
}
ErrImageNotFound is returned when image name is not found in the cluster on the given pool
func (ErrImageNotFound) Error ¶
func (e ErrImageNotFound) Error() string
type ErrInvalidVolID ¶
type ErrInvalidVolID struct {
// contains filtered or unexported fields
}
ErrInvalidVolID is returned when a CSI passed VolumeID does not conform to any known volume ID formats
func (ErrInvalidVolID) Error ¶
func (e ErrInvalidVolID) Error() string
type ErrMissingStash ¶ added in v1.2.0
type ErrMissingStash struct {
// contains filtered or unexported fields
}
ErrMissingStash is returned when the image metadata stash file is not found
func (ErrMissingStash) Error ¶ added in v1.2.0
func (e ErrMissingStash) Error() string
type ErrSnapNotFound ¶
type ErrSnapNotFound struct {
// contains filtered or unexported fields
}
ErrSnapNotFound is returned when snap name passed is not found in the list of snapshots for the given image
func (ErrSnapNotFound) Error ¶
func (e ErrSnapNotFound) Error() string
type ErrVolNameConflict ¶
type ErrVolNameConflict struct {
// contains filtered or unexported fields
}
ErrVolNameConflict is generated when a requested CSI volume name already exists on RBD but with different properties, and hence is in conflict with the passed in CSI volume name
func (ErrVolNameConflict) Error ¶
func (e ErrVolNameConflict) Error() string
type IdentityServer ¶
type IdentityServer struct {
*csicommon.DefaultIdentityServer
}
IdentityServer struct of rbd CSI driver with supported methods of CSI identity server spec.
func NewIdentityServer ¶
func NewIdentityServer(d *csicommon.CSIDriver) *IdentityServer
NewIdentityServer initialize a identity server for rbd CSI driver
func (*IdentityServer) GetPluginCapabilities ¶
func (is *IdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities returns available capabilities of the rbd driver
type NodeServer ¶
type NodeServer struct { *csicommon.DefaultNodeServer // A map storing all volumes with ongoing operations so that additional operations // for that same volume (as defined by VolumeID) return an Aborted error VolumeLocks *util.VolumeLocks // contains filtered or unexported fields }
NodeServer struct of ceph rbd driver with supported methods of CSI node server spec
func NewNodeServer ¶
func NewNodeServer(d *csicommon.CSIDriver, t string) (*NodeServer, error)
NewNodeServer initialize a node server for rbd CSI driver.
func (*NodeServer) NodeExpandVolume ¶
func (ns *NodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (*NodeServer) NodeGetCapabilities ¶ added in v1.2.0
func (ns *NodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities returns the supported capabilities of the node server
func (*NodeServer) NodePublishVolume ¶
func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume mounts the volume mounted to the device path to the target path
func (*NodeServer) NodeStageVolume ¶ added in v1.2.0
func (ns *NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
NodeStageVolume mounts the volume to a staging path on the node. Implementation notes: - stagingTargetPath is the directory passed in the request where the volume needs to be staged
- We stage the volume into a directory, named after the VolumeID inside stagingTargetPath if it is a file system
- We stage the volume into a file, named after the VolumeID inside stagingTargetPath if it is a block volume
- Order of operation execution: (useful for defer stacking and when Unstaging to ensure steps are done in reverse, this is done in undoStagingTransaction)
- Stash image metadata under staging path
- Map the image (creates a device)
- Create the staging file/directory under staging path
- Stage the device (mount the device mapped for image)
func (*NodeServer) NodeUnpublishVolume ¶
func (ns *NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume unmounts the volume from the target path
func (*NodeServer) NodeUnstageVolume ¶ added in v1.2.0
func (ns *NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
NodeUnstageVolume unstages the volume from the staging path