Documentation
¶
Index ¶
- Constants
- Variables
- type BackendNotImplementedGetRealMountpointError
- type Controller
- func (c *Controller) Attach(attachRequest k8sresources.FlexVolumeAttachRequest) k8sresources.FlexVolumeResponse
- func (c *Controller) Detach(detachRequest k8sresources.FlexVolumeDetachRequest) k8sresources.FlexVolumeResponse
- func (c *Controller) GetVolumeName(getVolumeNameRequest k8sresources.FlexVolumeGetVolumeNameRequest) k8sresources.FlexVolumeResponse
- func (c *Controller) Init(config resources.UbiquityPluginConfig) k8sresources.FlexVolumeResponse
- func (c *Controller) IsAttached(isAttachedRequest k8sresources.FlexVolumeIsAttachedRequest) k8sresources.FlexVolumeResponse
- func (c *Controller) Mount(mountRequest k8sresources.FlexVolumeMountRequest) k8sresources.FlexVolumeResponse
- func (c *Controller) MountDevice(mountDeviceRequest k8sresources.FlexVolumeMountDeviceRequest) k8sresources.FlexVolumeResponse
- func (c *Controller) TestUbiquity(config resources.UbiquityPluginConfig) k8sresources.FlexVolumeResponse
- func (c *Controller) Unmount(unmountRequest k8sresources.FlexVolumeUnmountRequest) k8sresources.FlexVolumeResponse
- func (c *Controller) UnmountDevice(unmountDeviceRequest k8sresources.FlexVolumeUnmountDeviceRequest) k8sresources.FlexVolumeResponse
- func (c *Controller) WaitForAttach(waitForAttachRequest k8sresources.FlexVolumeWaitForAttachRequest) k8sresources.FlexVolumeResponse
- type FailRemovePVorigDirError
- type NoMounterForVolumeError
- type PVIsAlreadyUsedByAnotherPod
- type PvBackendNotSupportedError
- type SpectrumScaleMissingMntPtVolumeError
- type WrongK8sDirectoryPathError
Constants ¶
const ( K8sPodsDirecotryName = "pods" FlexSuccessStr = "Success" FlexFailureStr = "Failure" FlexNotSupportedStr = "Not supported" )
const BackendNotImplementedGetRealMountpointErrorStr = "Backend do not support getting the real mountpoint from PV"
const FailRemovePVorigDirErrorStr = "Failed removing existing volume directory"
const IdempotentDetachSkipOnVolumeNotExistWarnigMsg = "Detach operation requested to work on not exist volume. Assume its idempotent issue - so skip Detach."
const IdempotentIsAttachedSkipOnVolumeNotExistWarnigMsg = "IsAttached operation requested to work on not exist volume. Assume its idempotent issue - so skip IsAttached."
const IdempotentUnmountSkipOnVolumeNotExistWarnigMsg = "Unmount operation requested to work on not exist volume. Assume its idempotent issue - so skip Unmount."
const K8sPVDirectoryIsNotDirNorSlinkErrorStr = "k8s PV directory, k8s-mountpoint, is not a directory nor slink."
const K8sPVDirectoryIsNotSlinkErrorStr = "k8s PV directory, k8s-mountpoint, is not slink."
const MissingWwnMountRequestErrorStr = "volume related to scbe backend must have mountRequest.Opts[Wwn] not found (expect to have wwn for scbe backend volume type)"
const PVIsAlreadyUsedByAnotherPodMessage = "PV is already in use by another pod and has an existing slink to mountpoint."
const PvBackendNotSupportedErrorStr = "Backend type not supported."
const SpectrumScaleMissingMntPtVolumeErrorStr = "MountPoint Missing in Volume Config."
const SupportK8sVesion = "Support only k8s version >= 1.6."
const WrongSlinkErrorStr = "Idempotent - The existing slink point to a wrong mountpoint."
Variables ¶
var WrongK8sDirectoryPathErrorMessage = fmt.Sprintf("Expected to find [%s] directory in k8s mount path.", K8sPodsDirecotryName)
Functions ¶
This section is empty.
Types ¶
type BackendNotImplementedGetRealMountpointError ¶ added in v1.2.0
type BackendNotImplementedGetRealMountpointError struct {
Backend string
}
func (*BackendNotImplementedGetRealMountpointError) Error ¶ added in v1.2.0
func (e *BackendNotImplementedGetRealMountpointError) Error() string
type Controller ¶
type Controller struct { Client resources.StorageClient // contains filtered or unexported fields }
Controller this is a structure that controls volume management
func NewController ¶
func NewController(logger *log.Logger, config resources.UbiquityPluginConfig) (*Controller, error)
NewController allows to instantiate a controller
func NewControllerWithClient ¶
func NewControllerWithClient(logger *log.Logger, config resources.UbiquityPluginConfig, client resources.StorageClient, exec utils.Executor, mFactory mounter.MounterFactory) *Controller
NewControllerWithClient is made for unit testing purposes where we can pass a fake client
func (*Controller) Attach ¶
func (c *Controller) Attach(attachRequest k8sresources.FlexVolumeAttachRequest) k8sresources.FlexVolumeResponse
Attach method attaches a volume to a host
func (*Controller) Detach ¶
func (c *Controller) Detach(detachRequest k8sresources.FlexVolumeDetachRequest) k8sresources.FlexVolumeResponse
Detach detaches the volume/ fileset from the pod
func (*Controller) GetVolumeName ¶
func (c *Controller) GetVolumeName(getVolumeNameRequest k8sresources.FlexVolumeGetVolumeNameRequest) k8sresources.FlexVolumeResponse
GetVolumeName checks if volume is attached
func (*Controller) Init ¶
func (c *Controller) Init(config resources.UbiquityPluginConfig) k8sresources.FlexVolumeResponse
Init method is to initialize the k8sresourcesvolume
func (*Controller) IsAttached ¶
func (c *Controller) IsAttached(isAttachedRequest k8sresources.FlexVolumeIsAttachedRequest) k8sresources.FlexVolumeResponse
IsAttached checks if volume is attached
func (*Controller) Mount ¶
func (c *Controller) Mount(mountRequest k8sresources.FlexVolumeMountRequest) k8sresources.FlexVolumeResponse
Mount method allows to mount the volume/fileset to a given location for a pod
func (*Controller) MountDevice ¶
func (c *Controller) MountDevice(mountDeviceRequest k8sresources.FlexVolumeMountDeviceRequest) k8sresources.FlexVolumeResponse
MountDevice mounts a device in a given location
func (*Controller) TestUbiquity ¶ added in v1.0.0
func (c *Controller) TestUbiquity(config resources.UbiquityPluginConfig) k8sresources.FlexVolumeResponse
TestUbiquity method is to test connectivity to ubiquity
func (*Controller) Unmount ¶
func (c *Controller) Unmount(unmountRequest k8sresources.FlexVolumeUnmountRequest) k8sresources.FlexVolumeResponse
Unmount methods unmounts the volume from the pod
func (*Controller) UnmountDevice ¶
func (c *Controller) UnmountDevice(unmountDeviceRequest k8sresources.FlexVolumeUnmountDeviceRequest) k8sresources.FlexVolumeResponse
UnmountDevice checks if volume is unmounted
func (*Controller) WaitForAttach ¶
func (c *Controller) WaitForAttach(waitForAttachRequest k8sresources.FlexVolumeWaitForAttachRequest) k8sresources.FlexVolumeResponse
WaitForAttach Waits for a volume to get attached to the node
type FailRemovePVorigDirError ¶ added in v1.2.0
type FailRemovePVorigDirError struct {
// contains filtered or unexported fields
}
func (*FailRemovePVorigDirError) Error ¶ added in v1.2.0
func (e *FailRemovePVorigDirError) Error() string
type NoMounterForVolumeError ¶ added in v1.2.0
type NoMounterForVolumeError struct {
// contains filtered or unexported fields
}
TODO need to remove this error, since its moved to ubiquity it self
func (*NoMounterForVolumeError) Error ¶ added in v1.2.0
func (e *NoMounterForVolumeError) Error() string
type PVIsAlreadyUsedByAnotherPod ¶ added in v1.2.0
type PVIsAlreadyUsedByAnotherPod struct {
// contains filtered or unexported fields
}
func (*PVIsAlreadyUsedByAnotherPod) Error ¶ added in v1.2.0
func (e *PVIsAlreadyUsedByAnotherPod) Error() string
type PvBackendNotSupportedError ¶ added in v1.2.0
type PvBackendNotSupportedError struct {
Backend string
}
func (*PvBackendNotSupportedError) Error ¶ added in v1.2.0
func (e *PvBackendNotSupportedError) Error() string
type SpectrumScaleMissingMntPtVolumeError ¶
type SpectrumScaleMissingMntPtVolumeError struct {
VolumeName string
}
func (*SpectrumScaleMissingMntPtVolumeError) Error ¶
func (e *SpectrumScaleMissingMntPtVolumeError) Error() string
type WrongK8sDirectoryPathError ¶ added in v1.2.0
type WrongK8sDirectoryPathError struct {
// contains filtered or unexported fields
}
func (*WrongK8sDirectoryPathError) Error ¶ added in v1.2.0
func (e *WrongK8sDirectoryPathError) Error() string