Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Close() error
- func (c *Client) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (c *Client) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (c *Client) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (c *Client) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (c *Client) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (c *Client) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (c *Client) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (c *Client) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (c *Client) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (c *Client) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (c *Client) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type Plugin
- func (p *Plugin) AttachVolume(ctx context.Context, volumeID string, node string) error
- func (p *Plugin) CreateVolume(ctx context.Context, name string, capacity string, driverName string, ...) (string, map[string]string, error)
- func (p *Plugin) DeleteVolume(ctx context.Context, volumeID string) error
- func (p *Plugin) DetachVolume(ctx context.Context, volumeID string, node string) error
- func (p *Plugin) DriverName(ctx context.Context) (string, error)
- func (p *Plugin) MountVolume(ctx context.Context, volumeID string, targetPath string, ...) error
- func (p *Plugin) UnmountVolume(ctx context.Context, volumeID string, targetPath string) error
Constants ¶
const ( // DefaultClientCertPath is the path to the pod identity credential bundle. DefaultClientCertPath = "/run/podidentity.podcert.ate.dev/credential-bundle.pem" // DefaultCACertPath is the path to the servicedns trust bundle. DefaultCACertPath = "/run/servicedns.podcert.ate.dev/trust-bundle.pem" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the gRPC connection and the individual service clients for a CSI driver.
func NewCSIClient ¶
NewCSIClient establishes a gRPC connection to the CSI driver over UDS or TCP and returns a client initialized with Identity, Controller, and Node service clients.
func (*Client) ControllerPublishVolume ¶
func (c *Client) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume attaches the volume to a node.
func (*Client) ControllerUnpublishVolume ¶
func (c *Client) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume detaches the volume from a node.
func (*Client) CreateVolume ¶
func (c *Client) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume provisions a new volume.
func (*Client) DeleteVolume ¶
func (c *Client) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume deprovisions a volume.
func (*Client) GetPluginCapabilities ¶
func (c *Client) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities returns the capabilities supported by the CSI plugin.
func (*Client) GetPluginInfo ¶
func (c *Client) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo returns the metadata (name, version) of the CSI plugin.
func (*Client) NodePublishVolume ¶
func (c *Client) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume mounts the volume to the target path.
func (*Client) NodeStageVolume ¶
func (c *Client) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
NodeStageVolume performs initial setup (staging) of a volume (e.g., formatting).
func (*Client) NodeUnpublishVolume ¶
func (c *Client) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume unmounts the volume.
func (*Client) NodeUnstageVolume ¶
func (c *Client) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
NodeUnstageVolume undoes NodeStageVolume.
func (*Client) Probe ¶
func (c *Client) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe checks the health/readiness status of the CSI plugin.
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements volume.VolumePluginWorkerPlane using the CSI Client.
func NewCSIPlugin ¶
func NewCSIPlugin(ctx context.Context, lister listersv1alpha1.CSIDriverConfigLister, driverName string, isController bool) (*Plugin, error)
NewCSIPlugin establishes a CSI client and returns a verified Plugin instance.
func (*Plugin) AttachVolume ¶
AttachVolume maps to CSI Controller ControllerPublishVolume.
func (*Plugin) CreateVolume ¶
func (p *Plugin) CreateVolume(ctx context.Context, name string, capacity string, driverName string, parameters map[string]string) (string, map[string]string, error)
CreateVolume maps to CSI Controller CreateVolume.
func (*Plugin) DeleteVolume ¶
DeleteVolume maps to CSI Controller DeleteVolume.
func (*Plugin) DetachVolume ¶
DetachVolume maps to CSI Controller ControllerUnpublishVolume.
func (*Plugin) DriverName ¶
DriverName returns the driver name obtained from the CSI plugin.