smb

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
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 CleanupSMBMountPoint(m *mount.SafeFormatAndMount, target string, extensiveMountCheck bool, _ string) error

func GetVersionYAML

func GetVersionYAML(driverName string) (string, error)

GetVersionYAML returns the version information of the driver in YAML format

func IsCorruptedDir

func IsCorruptedDir(dir string) bool

func Mkdir added in v0.3.0

func Mkdir(_ *mount.SafeFormatAndMount, name string, perm os.FileMode) error

func Mount

func Mount(m *mount.SafeFormatAndMount, source, target, fsType string, options, sensitiveMountOptions []string, _ string) error

func NewFakeMounter added in v0.4.0

func NewFakeMounter() (*mount.SafeFormatAndMount, error)

Types

type Driver

type Driver struct {
	csicommon.CSIDriver
	// 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

ControllerExpandVolume expand volume

func (*Driver) ControllerGetCapabilities

ControllerGetCapabilities returns the capabilities of the Controller plugin

func (*Driver) ControllerGetVolume added in v0.2.0

ControllerGetVolume get volume

func (*Driver) CreateSnapshot

func (*Driver) CreateVolume

func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)

func (*Driver) DeleteSnapshot

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

GetCapacity returns the capacity of the total available storage pool

func (*Driver) GetPluginCapabilities

GetPluginCapabilities returns the capabilities of the plugin

func (*Driver) GetPluginInfo

GetPluginInfo return the version and name of the plugin

func (*Driver) ListSnapshots

func (*Driver) ListVolumes

ListVolumes return all available volumes

func (*Driver) NodeExpandVolume

NodeExpandVolume node expand volume N/A for smb

func (*Driver) NodeGetCapabilities

NodeGetCapabilities return the capabilities of the Node plugin

func (*Driver) NodeGetInfo

NodeGetInfo return info of the node on which this plugin is running

func (*Driver) NodeGetVolumeStats

NodeGetVolumeStats get volume stats

func (*Driver) NodePublishVolume

NodePublishVolume mount the volume from staging to target path

func (*Driver) NodeStageVolume

NodeStageVolume mount the volume to a staging path

func (*Driver) NodeUnpublishVolume

NodeUnpublishVolume unmount the volume from the target path

func (*Driver) NodeUnstageVolume

NodeUnstageVolume unmount the volume from the staging path

func (*Driver) Probe

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) Run

func (d *Driver) Run(endpoint, _ string, testMode bool)

Run driver initialization

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
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL