Documentation ¶
Index ¶
- Constants
- Variables
- func GetCSIDriverName(spec *volume.Spec) (string, error)
- func GetCSIMounterPath(path string) string
- func NewMetricsCsi(volumeID string, targetPath string, driverName csiDriverName) volume.MetricsProvider
- func ProbeVolumePlugins() []volume.VolumePlugin
- type Driver
- type DriversStore
- type MetricsManager
- type RegistrationHandler
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 ¶
var PluginHandler = &RegistrationHandler{}
PluginHandler is the plugin registration handler interface passed to the pluginwatcher module in kubelet
Functions ¶
func GetCSIDriverName ¶ added in v1.20.0
GetCSIDriverName returns the csi driver name
func GetCSIMounterPath ¶ added in v1.19.0
GetCSIMounterPath returns the mounter path given the base path.
func NewMetricsCsi ¶ added in v1.15.0
func NewMetricsCsi(volumeID string, targetPath string, driverName csiDriverName) volume.MetricsProvider
NewMetricsCsi creates a new metricsCsi with the Volume ID and path.
func ProbeVolumePlugins ¶
func ProbeVolumePlugins() []volume.VolumePlugin
ProbeVolumePlugins returns implemented plugins
Types ¶
type Driver ¶ added in v1.14.0
type Driver struct {
// contains filtered or unexported fields
}
Driver is a description of a CSI Driver, defined by an endpoint and the highest CSI version supported
type DriversStore ¶ added in v1.14.0
DriversStore holds a list of CSI Drivers
func (*DriversStore) Clear ¶ added in v1.14.0
func (s *DriversStore) Clear()
Clear deletes all entries in the store. This methiod is protected by a mutex.
func (*DriversStore) Delete ¶ added in v1.14.0
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 ¶ added in v1.14.0
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 ¶ added in v1.14.0
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 MetricsManager ¶ added in v1.21.0
type MetricsManager struct {
// contains filtered or unexported fields
}
MetricsManager defines the metrics manager for CSI operation
func NewCSIMetricsManager ¶ added in v1.21.0
func NewCSIMetricsManager(driverName string) *MetricsManager
NewCSIMetricsManager creates a CSIMetricsManager object
func (*MetricsManager) RecordMetricsInterceptor ¶ added in v1.21.0
func (cmm *MetricsManager) RecordMetricsInterceptor( ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
RecordMetricsInterceptor is a grpc interceptor that is used to record CSI operation
type RegistrationHandler ¶ added in v1.12.0
type RegistrationHandler struct { }
RegistrationHandler is the handler which is fed to the pluginwatcher API.
func (*RegistrationHandler) DeRegisterPlugin ¶ added in v1.12.0
func (h *RegistrationHandler) DeRegisterPlugin(pluginName string)
DeRegisterPlugin is called when a plugin removed its socket, signaling it is no longer available
func (*RegistrationHandler) RegisterPlugin ¶ added in v1.12.0
func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string, versions []string) error
RegisterPlugin is called when a plugin can be registered
func (*RegistrationHandler) ValidatePlugin ¶ added in v1.12.0
func (h *RegistrationHandler) ValidatePlugin(pluginName string, endpoint string, versions []string) error
ValidatePlugin is called by kubelet's plugin watcher upon detection of a new registration socket opened by CSI Driver registrar side car.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package nodeinfomanager includes internal functions used to add/delete labels to kubernetes nodes for corresponding CSI drivers
|
Package nodeinfomanager includes internal functions used to add/delete labels to kubernetes nodes for corresponding CSI drivers |