Documentation ¶
Index ¶
- Constants
- func GetCommit() string
- func GetTreeState() string
- func GetVersion() string
- func NewMountError(mountErrorValue MountErrorType, format string, args ...interface{}) error
- type Driver
- func (d *Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (d *Driver) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, 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(context.Context, *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (d *Driver) DeleteSnapshot(context.Context, *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (d *Driver) GetCapacity(_ context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (d *Driver) GetPluginCapabilities(_ context.Context, _ *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (d *Driver) GetPluginInfo(_ context.Context, _ *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (d *Driver) ListSnapshots(context.Context, *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (d *Driver) NodeExpandVolume(_ context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (d *Driver) NodeGetCapabilities(_ context.Context, _ *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (d *Driver) NodeGetInfo(_ context.Context, _ *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (d *Driver) NodeGetVolumeStats(_ context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (d *Driver) NodePublishVolume(_ context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (d *Driver) NodeStageVolume(_ context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (d *Driver) NodeUnpublishVolume(_ context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (d *Driver) NodeUnstageVolume(_ context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (d *Driver) Probe(_ context.Context, _ *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (d *Driver) Run(ctx context.Context) error
- func (d *Driver) ValidateVolumeCapabilities(_ context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type HealthCheck
- type HealthChecker
- type MountError
- type MountErrorType
- type Mounter
- type RwMap
Constants ¶
const ( // DefaultDriverName defines the name that is used in Kubernetes and the CSI // system for the canonical, official name of this plugin DefaultDriverName = "yandex.csi.flant.com" // DefaultAddress is the default address that the csi plugin will serve its // http handler on. DefaultAddress = "127.0.0.1:12302" DefaultClusterUUID = "default" )
Variables ¶
This section is empty.
Functions ¶
func GetTreeState ¶
func GetTreeState() string
func GetVersion ¶
func GetVersion() string
func NewMountError ¶ added in v0.9.12
func NewMountError(mountErrorValue MountErrorType, format string, args ...interface{}) error
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements the following CSI interfaces:
csi.IdentityServer csi.ControllerServer csi.NodeServer
func NewDriver ¶
NewDriver returns a CSI plugin that contains the necessary gRPC interfaces to interact with Kubernetes over unix domain sockets for managaing Yandex Disks
func (*Driver) ControllerExpandVolume ¶
func (d *Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume is called from the resizer to increase the volume size.
func (*Driver) ControllerGetCapabilities ¶
func (d *Driver) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities returns the capabilities of the controller service.
func (*Driver) ControllerPublishVolume ¶
func (d *Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume attaches the given volume to the node
func (*Driver) ControllerUnpublishVolume ¶
func (d *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume deattaches the given volume from the node
func (*Driver) CreateSnapshot ¶
func (d *Driver) CreateSnapshot(context.Context, *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (*Driver) CreateVolume ¶
func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume creates a new volume from the given request. The function is idempotent.
func (*Driver) DeleteSnapshot ¶
func (d *Driver) DeleteSnapshot(context.Context, *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (*Driver) DeleteVolume ¶
func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume deletes the given volume. The function is idempotent.
func (*Driver) GetCapacity ¶
func (d *Driver) GetCapacity(_ context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
GetCapacity returns the capacity of the storage pool
func (*Driver) GetPluginCapabilities ¶
func (d *Driver) GetPluginCapabilities(_ context.Context, _ *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities returns available capabilities of the plugin
func (*Driver) GetPluginInfo ¶
func (d *Driver) GetPluginInfo(_ context.Context, _ *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo returns metadata of the plugin
func (*Driver) ListSnapshots ¶
func (d *Driver) ListSnapshots(context.Context, *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*Driver) ListVolumes ¶
func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
ListVolumes returns a list of all requested volumes
func (*Driver) NodeExpandVolume ¶
func (d *Driver) NodeExpandVolume(_ context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (*Driver) NodeGetCapabilities ¶
func (d *Driver) NodeGetCapabilities(_ context.Context, _ *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities returns the supported capabilities of the node server
func (*Driver) NodeGetInfo ¶
func (d *Driver) NodeGetInfo(_ context.Context, _ *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
NodeGetInfo returns the supported capabilities of the node server. This should eventually return the droplet ID if possible. This is used so the CO knows where to place the workload. The result of this function will be used by the CO in ControllerPublishVolume.
func (*Driver) NodeGetVolumeStats ¶
func (d *Driver) NodeGetVolumeStats(_ context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
NodeGetVolumeStats returns the volume capacity statistics available for the the given volume.
func (*Driver) NodePublishVolume ¶
func (d *Driver) NodePublishVolume(_ context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume mounts the volume mounted to the staging path to the target path
func (*Driver) NodeStageVolume ¶
func (d *Driver) NodeStageVolume(_ context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
NodeStageVolume mounts the volume to a staging path on the node. This is called by the CO before NodePublishVolume and is used to temporary mount the volume to a staging path. Once mounted, NodePublishVolume will make sure to mount it to the appropriate path
func (*Driver) NodeUnpublishVolume ¶
func (d *Driver) NodeUnpublishVolume(_ context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume unmounts the volume from the target path
func (*Driver) NodeUnstageVolume ¶
func (d *Driver) NodeUnstageVolume(_ context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
NodeUnstageVolume unstages the volume from the staging path
func (*Driver) Probe ¶
func (d *Driver) Probe(_ context.Context, _ *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe returns the health and readiness of the plugin
func (*Driver) ValidateVolumeCapabilities ¶
func (d *Driver) ValidateVolumeCapabilities(_ context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities checks whether the volume capabilities requested are supported.
type HealthCheck ¶
HealthCheck is the interface that must be implemented to be compatible with `HealthChecker`.
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
HealthChecker helps with writing multi component health checkers.
func NewHealthChecker ¶
func NewHealthChecker(checks ...HealthCheck) *HealthChecker
NewHealthChecker configures a new health checker with the passed in checks.
type MountError ¶ added in v0.9.12
type MountError struct { Type MountErrorType Message string }
func (MountError) Error ¶ added in v0.9.12
func (mountError MountError) Error() string
func (MountError) String ¶ added in v0.9.12
func (mountError MountError) String() string
type MountErrorType ¶ added in v0.9.12
type MountErrorType string
const (
HasFilesystemErrors MountErrorType = "HasFilesystemErrors"
)
type Mounter ¶
type Mounter interface { // Format formats the source with the given filesystem type Format(source, fsType string) error // Mount mounts source to target with the given fstype and options. Mount(source, target, fsType string, options ...string) error // Unmount unmounts the given target Unmount(target string) error // IsFormatted checks whether the source device is formatted or not. It // returns true if the source device is already formatted. IsFormatted(source string) (bool, error) // IsMounted checks whether the target path is a correct mount (i.e: // propagated). It returns true if it's mounted. An error is returned in // case of system errors or if it's mounted incorrectly. IsMounted(target string) (bool, error) // GetStatistics returns capacity-related volume statistics for the given // volume path. GetStatistics(volumePath string) (volumeStatistics, error) // IsBlockDevice checks whether the device at the path is a block device IsBlockDevice(volumePath string) (bool, error) }
Mounter is responsible for formatting and mounting volumes
type RwMap ¶
type RwMap struct {
// contains filtered or unexported fields
}