azurefile

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverName = "file.csi.azure.com"
)

Variables

View Source
var (
	DefaultAzureCredentialFileEnv = "AZURE_CREDENTIAL_FILE"
	DefaultCredFilePathLinux      = "/etc/kubernetes/azure.json"
	DefaultCredFilePathWindows    = "C:\\k\\azure.json"
)

Functions

func CleanupMountPoint added in v0.6.0

func CleanupMountPoint(m *mount.SafeFormatAndMount, target string, extensiveMountCheck bool) error

func CleanupSMBMountPoint added in v0.6.0

func CleanupSMBMountPoint(m *mount.SafeFormatAndMount, target string, extensiveMountCheck bool) error

func GetCloudProvider

func GetCloudProvider(kubeconfig string) (*azure.Cloud, error)

GetCloudProvider get Azure Cloud Provider

func GetFileShareInfo added in v0.8.0

func GetFileShareInfo(id string) (string, string, string, string, error)

get file share info according to volume id, e.g. input: "rg#f5713de20cde511e8ba4900#pvc-file-dynamic-17e43f84-f474-11e8-acd0-000d3a00df41#diskname.vhd" output: rg, f5713de20cde511e8ba4900, pvc-file-dynamic-17e43f84-f474-11e8-acd0-000d3a00df41, diskname.vhd

func GetVersionYAML

func GetVersionYAML() (string, error)

GetVersionYAML returns the version information of the driver in YAML format

func IsCorruptedDir added in v0.5.0

func IsCorruptedDir(dir string) bool

func RemoveStageTarget added in v0.6.0

func RemoveStageTarget(m *mount.SafeFormatAndMount, target string) error

func SMBMount added in v0.6.0

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

func SMBUnmount added in v0.6.0

func SMBUnmount(m *mount.SafeFormatAndMount, target string) 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(nodeID string) *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 controller expand volume

func (*Driver) ControllerGetCapabilities

ControllerGetCapabilities returns the capabilities of the Controller plugin

func (*Driver) ControllerGetVolume added in v0.8.0

ControllerGetVolume get volume

func (*Driver) ControllerPublishVolume

ControllerPublishVolume make a volume available on some required node

func (*Driver) ControllerUnpublishVolume

ControllerUnpublishVolume detach the volume on a specified node

func (*Driver) CreateSnapshot

CreateSnapshot create a snapshot (todo)

func (*Driver) CreateVolume

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

CreateVolume provisions an azure file

func (*Driver) DeleteSnapshot

DeleteSnapshot delete a snapshot (todo)

func (*Driver) DeleteVolume

func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)

DeleteVolume delete an azure file

func (*Driver) GetAccountInfo added in v0.7.0

func (d *Driver) GetAccountInfo(volumeID string, secrets, reqContext map[string]string) (rgName, accountName, accountKey, fileShareName, diskName string, err error)

func (*Driver) GetCapacity

func (d *Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)

GetCapacity returns the capacity of the total available storage pool

func (*Driver) GetPluginCapabilities

GetPluginCapabilities returns the capabilities of the plugin

func (*Driver) GetPluginInfo

func (f *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)

GetPluginInfo return the version and name of the plugin

func (*Driver) ListSnapshots

func (d *Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)

ListSnapshots list all snapshots (todo)

func (*Driver) ListVolumes

func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)

ListVolumes return all available volumes

func (*Driver) NodeExpandVolume

NodeExpandVolume node expand volume N/A for azure file

func (*Driver) NodeGetCapabilities

NodeGetCapabilities return the capabilities of the Node plugin

func (*Driver) NodeGetInfo

func (d *Driver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)

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

func (f *Driver) Probe(ctx context.Context, req *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) Run

func (d *Driver) Run(endpoint, kubeconfig string, testBool bool)

Run driver initialization

func (*Driver) ValidateVolumeCapabilities

ValidateVolumeCapabilities return the capabilities of the volume

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