Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultNodeNotReadyTimeDuration is the default time interval we need to consider node broken if it keeps NotReady DefaultNodeNotReadyTimeDuration = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeWatcher ¶
type NodeWatcher struct {
// contains filtered or unexported fields
}
NodeWatcher watches nodes conditions
func NewNodeWatcher ¶
func NewNodeWatcher( logger klog.Logger, driverName string, client kubernetes.Interface, volumeLister corelisters.PersistentVolumeLister, pvcLister corelisters.PersistentVolumeClaimLister, nodeInformer coreinformers.NodeInformer, recorder record.EventRecorder, pvcToPodsCache *util.PVCToPodsCache, nodeWorkerExecuteInterval time.Duration, nodeListAndAddInterval time.Duration, ) *NodeWatcher
NewNodeWatcher creates a node watcher object that will watch the nodes
func (*NodeWatcher) Run ¶
func (watcher *NodeWatcher) Run(ctx context.Context)
Run starts all of this controller's control loops
func (*NodeWatcher) WatchNodes ¶
func (watcher *NodeWatcher) WatchNodes(ctx context.Context)
WatchNodes periodically checks if nodes break down
type PVMonitorController ¶
type PVMonitorController struct {
// used for updating pvEnqueue map
sync.Mutex
// Time interval for calling ListVolumes RPC to check volumes' health condition
ListVolumesInterval time.Duration
// Time interval for executing pv worker goroutines
PVWorkerExecuteInterval time.Duration
// Time interval for listing volumes and add them to queue
VolumeListAndAddInterval time.Duration
// contains filtered or unexported fields
}
PVMonitorController is the struct of pv monitor controller containing all information to perform volumes health condition checking
func NewPVMonitorController ¶
func NewPVMonitorController( logger klog.Logger, client kubernetes.Interface, conn *grpc.ClientConn, factory informers.SharedInformerFactory, eventRecorder record.EventRecorder, option *PVMonitorOptions, ) *PVMonitorController
NewPVMonitorController creates PV monitor controller
func (*PVMonitorController) AddPVsToQueue ¶
func (ctrl *PVMonitorController) AddPVsToQueue() error
AddPVsToQueue adds PVs to queue periodically
type PVMonitorOptions ¶
type PVMonitorOptions struct {
ContextTimeout time.Duration
DriverName string
EnableNodeWatcher bool
SupportListVolume bool
ListVolumesInterval time.Duration
PVWorkerExecuteInterval time.Duration
VolumeListAndAddInterval time.Duration
NodeWorkerExecuteInterval time.Duration
NodeListAndAddInterval time.Duration
}
PVMonitorOptions configures PV monitor
Click to show internal directories.
Click to hide internal directories.