Documentation ¶
Index ¶
- Constants
- func GetCSIMounterPath(path string) string
- func NewMetricsCsi(volumeID string, targetPath string, driverName csiDriverName, ...) volume.MetricsProvider
- func ProbeVolumePlugins(nim nodeinfomanager.Interface, l *kubehelper.CSIDriverLister, ...) []volume.VolumePlugin
- type Driver
- type DriversStore
- type RegistrationHandler
- type VolumeHost
Constants ¶
const ( // CSIPluginName is the name of the in-tree CSI Plugin CSIPluginName = "kubernetes.io/csi" // CsiResyncPeriod is default resync period duration // TODO: increase to something useful CsiResyncPeriod = time.Minute )
const ( // TestInformerSyncPeriod is informer sync period duration for testing TestInformerSyncPeriod = 100 * time.Millisecond // TestInformerSyncTimeout is informer timeout duration for testing TestInformerSyncTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func GetCSIMounterPath ¶
GetCSIMounterPath returns the mounter path given the base path.
func NewMetricsCsi ¶
func NewMetricsCsi(volumeID string, targetPath string, driverName csiDriverName, csiDrivers *DriversStore) volume.MetricsProvider
NewMetricsCsi creates a new metricsCsi with the Volume ID and path.
func ProbeVolumePlugins ¶
func ProbeVolumePlugins(nim nodeinfomanager.Interface, l *kubehelper.CSIDriverLister, csiDrivers *DriversStore) []volume.VolumePlugin
ProbeVolumePlugins returns implemented plugins
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
driver is a description of a CSI driver, defined by an enpoint and the highest CSI version supported
type DriversStore ¶
DriversStore holds a list of CSI Drivers
func (*DriversStore) Clear ¶
func (s *DriversStore) Clear()
Clear deletes all entries in the store. This methiod is protected by a mutex.
func (*DriversStore) Delete ¶
func (s *DriversStore) Delete(driverName string)
Delete lets you delete a CSI driver by name. This method is protected by a mutex.
func (*DriversStore) Get ¶
func (s *DriversStore) Get(driverName string) (Driver, bool)
Get lets you retrieve a CSI driver by name. This method is protected by a mutex.
func (*DriversStore) Set ¶
func (s *DriversStore) Set(driverName string, driver Driver)
Set lets you save a CSI driver to the list and give it a specific name. This method is protected by a mutex.
type RegistrationHandler ¶
type RegistrationHandler struct { NodeInfoManager nodeinfomanager.Interface CSIDrivers *DriversStore }
RegistrationHandler is the handler which is fed to the pluginwatcher API.
func (*RegistrationHandler) DeRegisterPlugin ¶
func (h *RegistrationHandler) DeRegisterPlugin(pluginName string)
DeRegisterPlugin is called when a plugin removed its socket, signaling it is no longer available
type VolumeHost ¶
type VolumeHost interface { // SetKubeletError lets plugins set an error on the Kubelet runtime status // that will cause the Kubelet to post NotReady status with the error message provided SetKubeletError(err error) // GetInformerFactory returns the informer factory for CSIDriverLister GetInformerFactory() informers.SharedInformerFactory // CSIDriverLister returns the informer lister for the CSIDriver API Object CSIDriverLister() *kubehelper.CSIDriverLister // CSIDriverSynced returns the informer synced for the CSIDriver API Object CSIDriversSynced() cache.InformerSynced // WaitForCacheSync is a helper function that waits for cache sync for CSIDriverLister WaitForCacheSync() error // Returns hostutil.HostUtils GetHostUtil() hostutil.HostUtils volume.VolumeHost }
VolumeHost is a AttachDetach Controller specific interface that plugins can use to access methods on the Attach Detach Controller.