nas

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolType    = "protocolType"
	FileSystemType  = "fileSystemType"
	EncryptType     = "encryptType"
	SnapshotID      = "snapshotID"
	StorageType     = "storageType"
	ZoneID          = "zoneId"
	DESCRIPTION     = "description"
	ZoneIDTag       = "zone-id"
	NetworkType     = "networkType"
	VpcID           = "vpcId"
	VSwitchID       = "vSwitchId"
	AccessGroupName = "accessGroupName"
	RegionID        = "regionId"
	CnHangzhouFin   = "cn-hangzhou-finance"
	DeleteVolume    = "deleteVolume"
	// NASTAGKEY1 tag
	NASTAGKEY1 = "k8s.aliyun.com"
	// NASTAGVALUE1 value
	NASTAGVALUE1 = "true"
	// NASTAGKEY2 key
	NASTAGKEY2 = "createdby"
	// NASTAGVALUE2 value
	NASTAGVALUE2 = "alibabacloud-csi-plugin"
	// NASTAGKEY3 key
	NASTAGKEY3 = "ack.aliyun.com"
	// AddDefaultTagsError means that the add nas default tags error
	AddDefaultTagsError string = "AddDefaultTagsError"
	// LosetupType tag
	LosetupType = "losetup"
	// SkipMountType tag
	SkipMountType = "skipmount"
)
View Source
const (
	// NasTempMntPath used for create sub directory
	NasTempMntPath = "/mnt/acs_mnt/k8s_nas/temp"
	// NasPortnum is nas port
	NasPortnum = "2049"
	// NasMntPoint tag
	NasMntPoint = "/mnt/nasplugin.alibabacloud.com"
	// MountProtocolNFS common nfs protocol
	MountProtocolNFS = "nfs"
	// MountProtocolEFC common efc protocol
	MountProtocolEFC = "efc"
	// MountProtocolCPFS common cpfs protocol
	MountProtocolCPFS = "cpfs"
	// MountProtocolCPFSNFS cpfs-nfs protocol
	MountProtocolCPFSNFS = "cpfs-nfs"
	// MountProtocolCPFSNative cpfs-native protocol
	MountProtocolCPFSNative = "cpfs-native"
	// MountProtocolAliNas alinas protocol
	MountProtocolAliNas = "alinas"
	// MountProtocolTag tag
	MountProtocolTag = "mountProtocol"

	//EFCClient
	EFCClient = "efcclient"
	//NFSClient
	NFSClient = "nfsclient"
	//NativeClient
	NativeClient = "nativeclient"
)
View Source
const (
	// RegionTag is region id
	RegionTag = "region-id"
	// LoopLockFile lock file for nas loopsetup
	LoopLockFile = "loopsetup.nas.csi.alibabacloud.com.lck"
	// LoopImgFile image file for nas loopsetup
	LoopImgFile = "loopsetup.nas.csi.alibabacloud.com.img"
	// Resize2fsFailedFilename ...
	Resize2fsFailedFilename = "resize2fs_failed.txt"
	// Resize2fsFailedFixCmd ...
	Resize2fsFailedFixCmd = "%s fsck -a %s"
	// GiB bytes
	GiB = 1 << 30
	// see https://help.aliyun.com/zh/nas/modify-the-maximum-number-of-concurrent-nfs-requests
	TcpSlotTableEntries      = "/proc/sys/sunrpc/tcp_slot_table_entries"
	TcpSlotTableEntriesValue = "128\n"
)

Variables

This section is empty.

Functions

func DetermineClientTypeAndMountProtocol added in v1.2.0

func DetermineClientTypeAndMountProtocol(cnfs *v1beta1.ContainerNetworkFileSystem, opt *Options) error

func GetFsIDByCpfsServer added in v1.1.7

func GetFsIDByCpfsServer(server string) string

GetFsIDByCpfsServer func is get fsID from serverName

func GetFsIDByNasServer added in v1.1.7

func GetFsIDByNasServer(server string) string

GetFsIDByNasServer func is get fsID from serverName

func NewNasMounter added in v1.3.0

func NewNasMounter() mountutils.Interface

func ParseMountFlags added in v1.0.2

func ParseMountFlags(mntOptions []string) (string, string)

ParseMountFlags parse mountOptions

Types

type NAS added in v1.0.1

type NAS struct {
	// contains filtered or unexported fields
}

NAS the NAS object

func NewDriver

func NewDriver(meta *metadata.Metadata, endpoint, serviceType string) *NAS

func (*NAS) Run added in v1.0.1

func (d *NAS) Run()

type NasMounter added in v1.3.0

type NasMounter struct {
	mountutils.Interface
	// contains filtered or unexported fields
}

func (*NasMounter) Mount added in v1.3.0

func (m *NasMounter) Mount(source string, target string, fstype string, options []string) (err error)

type Options added in v1.0.1

type Options struct {
	Server        string `json:"server"`
	Accesspoint   string `json:"accesspoint"`
	Path          string `json:"path"`
	Vers          string `json:"vers"`
	Mode          string `json:"mode"`
	ModeType      string `json:"modeType"`
	Options       string `json:"options"`
	MountType     string `json:"mountType"`
	LoopImageSize int    `json:"loopImageSize"`
	LoopLock      string `json:"loopLock"`
	MountProtocol string `json:"mountProtocol"`
	ClientType    string `json:"clientType"`
	FSType        string `json:"fsType"`
}

Options struct definition

type RoleAuth added in v1.0.1

type RoleAuth struct {
	AccessKeyID     string
	AccessKeySecret string
	Expiration      time.Time
	SecurityToken   string
	LastUpdated     time.Time
	Code            string
}

RoleAuth define STS Token Response

type RunvNasOptions added in v1.0.4

type RunvNasOptions struct {
	Server     string `json:"server"`
	Path       string `json:"path"`
	Vers       string `json:"vers"`
	Mode       string `json:"mode"`
	ModeType   string `json:"modeType"`
	Options    string `json:"options"`
	RunTime    string `json:"runtime"`
	MountFile  string `json:"mountfile"`
	VolumeType string `json:"volumeType"`
}

RunvNasOptions struct definition

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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