Documentation ¶
Index ¶
- Constants
- func CleanupMountPoint(m *mount.SafeFormatAndMount, target string, extensiveMountCheck bool) error
- func CleanupSMBMountPoint(m *mount.SafeFormatAndMount, target string, extensiveMountCheck bool, _ string) error
- func GetVersionYAML(driverName string) (string, error)
- func IsCorruptedDir(dir string) bool
- func Mkdir(_ *mount.SafeFormatAndMount, name string, perm os.FileMode) error
- func Mount(m *mount.SafeFormatAndMount, source, target, fsType string, ...) error
- func NewFakeMounter() (*mount.SafeFormatAndMount, error)
- type Driver
- func (d *Driver) ControllerExpandVolume(_ context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (d *Driver) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (d *Driver) ControllerGetVolume(context.Context, *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (d *Driver) ControllerPublishVolume(_ context.Context, _ *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (d *Driver) ControllerUnpublishVolume(_ context.Context, _ *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (d *Driver) CreateSnapshot(_ context.Context, _ *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (d *Driver) DeleteSnapshot(_ context.Context, _ *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (d *Driver) GetCapacity(_ context.Context, _ *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (f *Driver) GetPluginCapabilities(_ context.Context, _ *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (f *Driver) GetPluginInfo(_ context.Context, _ *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (d *Driver) GetUserNamePasswordFromSecret(ctx context.Context, secretName, secretNamespace string) (string, string, string, error)
- func (d *Driver) ListSnapshots(_ context.Context, _ *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (d *Driver) ListVolumes(_ context.Context, _ *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (d *Driver) NodeExpandVolume(_ context.Context, _ *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (d *Driver) NodeGetCapabilities(_ context.Context, _ *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (d *Driver) NodeGetInfo(_ context.Context, _ *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (d *Driver) NodeGetVolumeStats(_ context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (d *Driver) NodeUnpublishVolume(_ context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (d *Driver) NodeUnstageVolume(_ context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (f *Driver) Probe(_ context.Context, _ *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (d *Driver) Run(endpoint, _ string, testMode bool)
- func (d *Driver) ValidateVolumeCapabilities(_ context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type DriverOptions
- type VersionInfo
Constants ¶
const ( DefaultDriverName = "smb.csi.k8s.io" DefaultKrb5CCName = "krb5cc_" DefaultKrb5CacheDirectory = "/var/lib/kubelet/kerberos/" )
Variables ¶
This section is empty.
Functions ¶
func CleanupMountPoint ¶
func CleanupMountPoint(m *mount.SafeFormatAndMount, target string, extensiveMountCheck bool) error
func CleanupSMBMountPoint ¶
func GetVersionYAML ¶
GetVersionYAML returns the version information of the driver in YAML format
func IsCorruptedDir ¶
func NewFakeMounter ¶ added in v0.4.0
func NewFakeMounter() (*mount.SafeFormatAndMount, error)
Types ¶
type Driver ¶
type Driver struct { csicommon.CSIDriver // Embed UnimplementedXXXServer to ensure the driver returns Unimplemented for any // new RPC methods that might be introduced in future versions of the spec. csi.UnimplementedControllerServer csi.UnimplementedIdentityServer csi.UnimplementedNodeServer // contains filtered or unexported fields }
Driver implements all interfaces of CSI drivers
func NewDriver ¶
func NewDriver(options *DriverOptions) *Driver
NewDriver Creates a NewCSIDriver object. Assumes vendor version is equal to driver version & does not support optional driver plugin info manifest field. Refer to CSI spec for more details.
func (*Driver) ControllerExpandVolume ¶
func (d *Driver) ControllerExpandVolume(_ context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume expand volume
func (*Driver) ControllerGetCapabilities ¶
func (d *Driver) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities returns the capabilities of the Controller plugin
func (*Driver) ControllerGetVolume ¶ added in v0.2.0
func (d *Driver) ControllerGetVolume(context.Context, *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume get volume
func (*Driver) ControllerPublishVolume ¶
func (d *Driver) ControllerPublishVolume(_ context.Context, _ *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
func (*Driver) ControllerUnpublishVolume ¶
func (d *Driver) ControllerUnpublishVolume(_ context.Context, _ *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
func (*Driver) CreateSnapshot ¶
func (d *Driver) CreateSnapshot(_ context.Context, _ *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (*Driver) CreateVolume ¶
func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (*Driver) DeleteSnapshot ¶
func (d *Driver) DeleteSnapshot(_ context.Context, _ *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (*Driver) DeleteVolume ¶
func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume only supports static provisioning, no delete volume action
func (*Driver) GetCapacity ¶
func (d *Driver) GetCapacity(_ context.Context, _ *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
GetCapacity returns the capacity of the total available storage pool
func (*Driver) GetPluginCapabilities ¶
func (f *Driver) GetPluginCapabilities(_ context.Context, _ *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities returns the capabilities of the plugin
func (*Driver) GetPluginInfo ¶
func (f *Driver) GetPluginInfo(_ context.Context, _ *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo return the version and name of the plugin
func (*Driver) GetUserNamePasswordFromSecret ¶ added in v1.17.0
func (d *Driver) GetUserNamePasswordFromSecret(ctx context.Context, secretName, secretNamespace string) (string, string, string, error)
GetUserNamePasswordFromSecret get storage account key from k8s secret return <username, password, domain, error>
func (*Driver) ListSnapshots ¶
func (d *Driver) ListSnapshots(_ context.Context, _ *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*Driver) ListVolumes ¶
func (d *Driver) ListVolumes(_ context.Context, _ *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
ListVolumes return all available volumes
func (*Driver) NodeExpandVolume ¶
func (d *Driver) NodeExpandVolume(_ context.Context, _ *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
NodeExpandVolume node expand volume N/A for smb
func (*Driver) NodeGetCapabilities ¶
func (d *Driver) NodeGetCapabilities(_ context.Context, _ *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities return the capabilities of the Node plugin
func (*Driver) NodeGetInfo ¶
func (d *Driver) NodeGetInfo(_ context.Context, _ *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
NodeGetInfo return info of the node on which this plugin is running
func (*Driver) NodeGetVolumeStats ¶
func (d *Driver) NodeGetVolumeStats(_ context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
NodeGetVolumeStats get volume stats
func (*Driver) NodePublishVolume ¶
func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume mount the volume from staging to target path
func (*Driver) NodeStageVolume ¶
func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
NodeStageVolume mount the volume to a staging path
func (*Driver) NodeUnpublishVolume ¶
func (d *Driver) NodeUnpublishVolume(_ context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume unmount the volume from the target path
func (*Driver) NodeUnstageVolume ¶
func (d *Driver) NodeUnstageVolume(_ context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
NodeUnstageVolume unmount the volume from the staging path
func (*Driver) Probe ¶
func (f *Driver) Probe(_ context.Context, _ *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe check whether the plugin is running or not. This method does not need to return anything. Currently the spec does not dictate what you should return either. Hence, return an empty response
func (*Driver) ValidateVolumeCapabilities ¶
func (d *Driver) ValidateVolumeCapabilities(_ context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
type DriverOptions ¶ added in v1.5.0
type DriverOptions struct { NodeID string DriverName string EnableGetVolumeStats bool // this only applies to Windows node RemoveSMBMappingDuringUnmount bool WorkingMountDir string VolStatsCacheExpireInMinutes int Krb5CacheDirectory string Krb5Prefix string DefaultOnDeletePolicy string RemoveArchivedVolumePath bool EnableWindowsHostProcess bool Kubeconfig string }
DriverOptions defines driver parameters specified in driver deployment
type VersionInfo ¶
type VersionInfo struct { DriverName string `json:"Driver Name"` DriverVersion string `json:"Driver Version"` GitCommit string `json:"Git Commit"` BuildDate string `json:"Build Date"` GoVersion string `json:"Go Version"` Compiler string `json:"Compiler"` Platform string `json:"Platform"` }
VersionInfo holds the version information of the driver
func GetVersion ¶
func GetVersion(driverName string) VersionInfo
GetVersion returns the version information of the driver