package plugin
import "k8s.io/kubernetes/pkg/kubelet/cm/dra/plugin"
Index ¶
- type Plugin
- func NewDRAPluginClient(pluginName string) (*Plugin, error)
- func (p *Plugin) NodePrepareResources( ctx context.Context, req *drapb.NodePrepareResourcesRequest, opts ...grpc.CallOption, ) (*drapb.NodePrepareResourcesResponse, error)
- func (p *Plugin) NodeUnprepareResources( ctx context.Context, req *drapb.NodeUnprepareResourcesRequest, opts ...grpc.CallOption, ) (*drapb.NodeUnprepareResourcesResponse, error)
- type RegistrationHandler
- func NewRegistrationHandler(kubeClient kubernetes.Interface, getNode func() (*v1.Node, error)) *RegistrationHandler
- func (h *RegistrationHandler) DeRegisterPlugin(pluginName string)
- func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string, versions []string, pluginClientTimeout *time.Duration) error
- func (h *RegistrationHandler) ValidatePlugin(pluginName string, endpoint string, versions []string) error
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func NewDRAPluginClient ¶
NewDRAPluginClient returns a wrapper around those gRPC methods of a DRA driver kubelet plugin which need to be called by kubelet. The wrapper handles gRPC connection management and logging. Connections are reused across different NewDRAPluginClient calls.
func (*Plugin) NodePrepareResources ¶
func (p *Plugin) NodePrepareResources( ctx context.Context, req *drapb.NodePrepareResourcesRequest, opts ...grpc.CallOption, ) (*drapb.NodePrepareResourcesResponse, error)
func (*Plugin) NodeUnprepareResources ¶
func (p *Plugin) NodeUnprepareResources( ctx context.Context, req *drapb.NodeUnprepareResourcesRequest, opts ...grpc.CallOption, ) (*drapb.NodeUnprepareResourcesResponse, error)
type RegistrationHandler ¶
type RegistrationHandler struct {
// contains filtered or unexported fields
}
RegistrationHandler is the handler which is fed to the pluginwatcher API.
func NewRegistrationHandler ¶
func NewRegistrationHandler(kubeClient kubernetes.Interface, getNode func() (*v1.Node, error)) *RegistrationHandler
NewPluginHandler returns new registration handler.
Must only be called once per process because it manages global state. If a kubeClient is provided, then it synchronizes ResourceSlices with the resource information provided by plugins.
func (*RegistrationHandler) DeRegisterPlugin ¶
func (h *RegistrationHandler) DeRegisterPlugin(pluginName string)
DeRegisterPlugin is called when a plugin has removed its socket, signaling it is no longer available.
func (*RegistrationHandler) RegisterPlugin ¶
func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string, versions []string, pluginClientTimeout *time.Duration) error
RegisterPlugin is called when a plugin can be registered.
func (*RegistrationHandler) ValidatePlugin ¶
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 DRA plugin.
Source Files ¶
client.go plugin.go plugins_store.go
- Version
- v1.31.5
- Published
- Jan 15, 2025
- Platform
- js/wasm
- Imports
- 21 packages
- Last checked
- 40 seconds ago –
Tools for package owners.