csi_handler

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSIHandler

type CSIHandler interface {
	ControllerListVolumeConditions(ctx context.Context) (map[string]*VolumeConditionResult, error)

	ControllerGetVolumeCondition(ctx context.Context, volumeID string) (*VolumeConditionResult, error)

	NodeGetVolumeCondition(ctx context.Context, volumeID string, volumePath string, volumeStagingPath string) (*VolumeConditionResult, error)
}

CSIHandler is for calling rpc interfaces

func NewCSIPVHandler

func NewCSIPVHandler(conn *grpc.ClientConn) CSIHandler

type PVHealthConditionChecker

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

PVHealthConditionChecker is for checking pv health condition

func NewPVHealthConditionChecker

func NewPVHealthConditionChecker(name string, conn *grpc.ClientConn, kClient kubernetes.Interface, timeout time.Duration,
	pvcLister corelisters.PersistentVolumeClaimLister, pvLister corelisters.PersistentVolumeLister, eventInformer coreinformers.EventInformer, recorder record.EventRecorder) *PVHealthConditionChecker

NewPVHealthConditionChecker returns an instance of PVHealthConditionChecker

func (*PVHealthConditionChecker) CheckControllerListVolumeStatuses

func (checker *PVHealthConditionChecker) CheckControllerListVolumeStatuses() error

CheckControllerListVolumeStatuses checks volumes health condition by ListVolumes

func (*PVHealthConditionChecker) CheckControllerVolumeStatus

func (checker *PVHealthConditionChecker) CheckControllerVolumeStatus(pv *v1.PersistentVolume) error

CheckControllerVolumeStatus checks volume status in controller side

func (*PVHealthConditionChecker) CheckNodeVolumeStatus

func (checker *PVHealthConditionChecker) CheckNodeVolumeStatus(kubeletRootPath string, supportStageUnstage bool, pv *v1.PersistentVolume, pod *v1.Pod) error

CheckNodeVolumeStatus checks volume status in node side

func (*PVHealthConditionChecker) GetVolumeHandle

func (checker *PVHealthConditionChecker) GetVolumeHandle(pv *v1.PersistentVolume) (string, error)

GetVolumeHandle returns the volume handle of the pv

type VolumeConditionResult

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

func (*VolumeConditionResult) GetAbnormal

func (vcr *VolumeConditionResult) GetAbnormal() bool

func (*VolumeConditionResult) GetMessage

func (vcr *VolumeConditionResult) GetMessage() string

Jump to

Keyboard shortcuts

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