node

package
v1.0.0-rc-3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2020 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDriveFinalizersWithConflictRetry added in v1.0.0

func AddDriveFinalizersWithConflictRetry(ctx context.Context, csiDriveName string, finalizers []string) error

AddDriveFinalizersWithConflictRetry - appends a finalizer to the csidrive's finalizers list

func FindDrives

func FindDrives(ctx context.Context, nodeID string, procfs string) ([]direct_csi.DirectCSIDrive, error)

func FormatDevice

func FormatDevice(ctx context.Context, source, fsType string, force bool) error

FormatDevice - Formats the given device

func GetDiskFS added in v1.0.0

func GetDiskFS(devicePath string) (string, error)

GetDiskFS - To get the filesystem of a block device

func GetLatestStatus added in v1.0.0

func GetLatestStatus(statusXs []metav1.Condition) metav1.Condition

GetLatestStatus gets the latest condition by time

func MountDevice

func MountDevice(devicePath, mountPoint, fsType string, options []string) error

MountDevice - Utility to mount a device in the given mountpoint

func PublishVolume

func PublishVolume(ctx context.Context, stagingPath, containerPath string, readOnly bool) error

func RemoveDriveFinalizerWithConflictRetry added in v1.0.0

func RemoveDriveFinalizerWithConflictRetry(ctx context.Context, csiDriveName string, finalizer string) error

RemoveDriveFinalizerWithConflictRetry - removes a finalizer from the csidrive's finalizers list

func StageVolume

func StageVolume(ctx context.Context, directCSIDrive *direct_csi.DirectCSIDrive, stagingPath string, volumeID string) (string, error)

func UnmountAllMountRefs

func UnmountAllMountRefs(mountPoint string) error

UnmountAllMountRefs - Unmount all mount refs. To avoid later mounts to overlap earlier mounts.

func UnpublishVolume

func UnpublishVolume(ctx context.Context, containerPath string) error

func UnstageVolume

func UnstageVolume(ctx context.Context, stagingPath string) error

func UpdateDriveStatusOnDiff added in v1.0.0

func UpdateDriveStatusOnDiff(newObj direct_csi.DirectCSIDrive, existingObj *direct_csi.DirectCSIDrive) bool

UpdateDriveStatusOnDiff Updates the drive status fields on diff.

Types

type DirectCSIDriveListener

type DirectCSIDriveListener struct {
	// contains filtered or unexported fields
}

func (*DirectCSIDriveListener) Add

func (*DirectCSIDriveListener) Delete

func (*DirectCSIDriveListener) InitializeDirectCSIClient

func (b *DirectCSIDriveListener) InitializeDirectCSIClient(bc clientset.Interface)

func (*DirectCSIDriveListener) InitializeKubeClient

func (b *DirectCSIDriveListener) InitializeKubeClient(k kubeclientset.Interface)

func (*DirectCSIDriveListener) Update

type NodeServer

type NodeServer struct {
	NodeID    string
	Identity  string
	Rack      string
	Zone      string
	Region    string
	BasePaths []string
}

func NewNodeServer

func NewNodeServer(ctx context.Context, identity, nodeID, rack, zone, region string, basePaths []string, procfs string) (*NodeServer, error)

func (*NodeServer) NodeExpandVolume

func (*NodeServer) NodeGetCapabilities

func (*NodeServer) NodeGetInfo

func (*NodeServer) NodeGetVolumeStats

func (*NodeServer) NodePublishVolume

func (*NodeServer) NodeStageVolume

func (*NodeServer) NodeUnpublishVolume

func (*NodeServer) NodeUnstageVolume

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL