Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecorderOption ¶
type RecorderOption struct {
// contains filtered or unexported fields
}
RecorderOption is the interface for creating new recorders. The VolumeConditionReporter will use this interface to configure a recorder and uses it to report the volume condition.
func WithEventRecorder ¶
func WithEventRecorder() RecorderOption
WithEventRecorder can be passed to the VolumeConditionRecorder so that it will create an Event for the PersistentVolumeClaim with the volume condition.
func WithLogRecorder ¶
func WithLogRecorder() RecorderOption
WithLogRecorder can be passed to the VolumeConditionReporter so that it will report the volume condition in the logs of the CSI-Addons sidecar.
type VolumeConditionReporter ¶
type VolumeConditionReporter interface {
// Run starts the checking of volumes at the given interval. This
// function is not expected to ever end, only if there is a critical
// error.
Run(ctx context.Context, interval time.Duration) error
}
VolumeConditionReporter provides the entrypoint for running the volume condition checks and reporting the results.
func NewVolumeConditionReporter ¶
func NewVolumeConditionReporter( ctx context.Context, client *kubernetes.Clientset, hostname, drivername string, recorderOptions []RecorderOption, ) (VolumeConditionReporter, error)
NewVolumeConditionReporter creates a new VolumeConditionReporter. The drivername that is passed is used to find the matching CSI-driver on the local node. Multiple RecorderOptions can be passed, which will be used to report the volume condition.