Documentation ¶
Index ¶
- Variables
- type ControllerServer
- 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(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 ErrSnapNotFound
- type ErrVolNameConflict
- type IdentityServer
- type NodeServer
Constants ¶
This section is empty.
Variables ¶
var ( // PluginFolder defines the location of ceph plugin PluginFolder = "/var/lib/kubelet/plugins/" // 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 }
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) 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(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 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 // 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, containerized bool) (*NodeServer, error)
NewNodeServer initialize a node server for rbd CSI driver.
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) NodeUnpublishVolume ¶
func (ns *NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume unmounts the volume from the target path