Documentation ¶
Index ¶
- Constants
- Variables
- func CheckNfsPathMounted(mountpoint, server, path string) bool
- func CreateDest(dest string) error
- func DoNfsMount(nfsServer, nfsPath, nfsVers, mountOptions, mountPoint, volumeID string) error
- func GetDefaultAK() (string, string, string)
- func GetLocalAK() (string, string)
- func GetMetaData(resource string) string
- func GetNfsDetails(nfsServersString string) (string, string)
- func GetSTSAK() (string, string, string)
- func GlobalConfigSet()
- func NewControllerServer(d *csicommon.CSIDriver, client *aliNas.Client, region string) csi.ControllerServer
- func ParseMountFlags(mntOptions []string) (string, string)
- func SetNasEndPoint(regionID string)
- type GlobalConfig
- type NAS
- type Options
- type RoleAuth
Constants ¶
View Source
const ( MNTROOTPATH = "/csi-persistentvolumes" MBSize = 1024 * 1024 DRIVER = "driver" SERVER = "server" MODE = "mode" ModeType = "modeType" VolumeAs = "volumeAs" PATH = "path" ProtocolType = "protocolType" StorageType = "storageType" ZoneID = "zoneId" DESCRIPTION = "description" ZoneIDTag = "zone-id" NetworkType = "networkType" VpcID = "vpcId" VSwitchID = "vSwitchId" AccessGroupName = "accessGroupName" DeleteVolume = "deleteVolume" )
resourcemode is selected by: subpath/filesystem
View Source
const ( // NasTempMntPath used for create sub directory NasTempMntPath = "/mnt/acs_mnt/k8s_nas/temp" // NasPortnum is nas port NasPortnum = "2049" // NasMetricByPlugin tag NasMetricByPlugin = "NAS_METRIC_BY_PLUGIN" )
View Source
const ( // MetadataURL is metadata url MetadataURL = "http://100.100.100.200/latest/meta-data/" // RegionTag is region id RegionTag = "region-id" )
View Source
const (
// InstanceID is instance id
InstanceID = "instance-id"
)
Variables ¶
View Source
var ( // VERSION should be updated by hand at each release VERSION = "v1.14.8" // GITCOMMIT will be overwritten automatically by the build system GITCOMMIT = "HEAD" // KubernetesAlicloudIdentity is the system identity for ecs client request KubernetesAlicloudIdentity = fmt.Sprintf("Kubernetes.Alicloud/CsiProvision.Nas-%s", VERSION) )
Functions ¶
func CheckNfsPathMounted ¶ added in v1.0.1
CheckNfsPathMounted check whether the given nfs path was mounted
func DoNfsMount ¶ added in v1.0.1
DoNfsMount execute the mount command for nas dir
func GetDefaultAK ¶ added in v1.0.1
GetDefaultAK read default ak from local file or from STS
func GetLocalAK ¶ added in v1.0.1
GetLocalAK return if ak meta defined in env
func GetMetaData ¶ added in v1.0.1
GetMetaData get host regionid, zoneid
func GetNfsDetails ¶ added in v1.0.1
GetNfsDetails get nfs server's details
func NewControllerServer ¶ added in v1.0.1
func NewControllerServer(d *csicommon.CSIDriver, client *aliNas.Client, region string) csi.ControllerServer
NewControllerServer is to create controller server
func ParseMountFlags ¶ added in v1.0.2
ParseMountFlags parse mountOptions
func SetNasEndPoint ¶ added in v1.0.2
func SetNasEndPoint(regionID string)
SetNasEndPoint Set Endpoint for Nas
Types ¶
type GlobalConfig ¶ added in v1.0.3
type GlobalConfig struct { Region string NasTagEnable bool ADControllerEnable bool MetricEnable bool }
GlobalConfig save global values for plugin
var ( // GlobalConfigVar Global Config GlobalConfigVar GlobalConfig )
type NAS ¶ added in v1.0.1
type NAS struct {
// contains filtered or unexported fields
}
NAS the NAS object
Click to show internal directories.
Click to hide internal directories.