Documentation ¶
Index ¶
- Constants
- Variables
- func GetCurrentDevices() []string
- func UnmountMountPoint(mountPath string) error
- type DiskOptions
- type DiskPlugin
- func (p *DiskPlugin) Attach(opts interface{}, nodeName string) utils.Result
- func (p *DiskPlugin) Detach(volumeName string, nodeName string) utils.Result
- func (p *DiskPlugin) GetDiskLocalConfig() (string, string, string)
- func (p *DiskPlugin) Getvolumename(opts interface{}) utils.Result
- func (p *DiskPlugin) Init() utils.Result
- func (p *DiskPlugin) Mount(opts interface{}, mountPath string) utils.Result
- func (p *DiskPlugin) Mountdevice(mountPath string, opts interface{}) utils.Result
- func (p *DiskPlugin) NewOptions() interface{}
- func (p *DiskPlugin) Unmount(mountPoint string) utils.Result
- func (p *DiskPlugin) Waitforattach(devicePath string, opts interface{}) utils.Result
Constants ¶
const ( KUBERNETES_ALICLOUD_DISK_DRIVER = "alicloud_disk" VolumeDir = "/etc/kubernetes/volumes/disk/" VolumeDirRemove = "/etc/kubernetes/volumes/disk/remove" DISK_AKID = "/etc/.volumeak/diskAkId" DISK_AKSECRET = "/etc/.volumeak/diskAkSecret" DISK_ECSENPOINT = "/etc/.volumeak/diskEcsEndpoint" ECSDEFAULTENDPOINT = "https://ecs-cn-hangzhou.aliyuncs.com" )
Const values for disk
Variables ¶
var DEFAULT_REGION = common.Hangzhou
default region for aliyun sdk usage
var KUBERNETES_ALICLOUD_IDENTITY = fmt.Sprintf("Kubernetes.Alicloud/Flexvolume.Disk-%s", utils.PluginVersion())
the iddentity for http headker
Functions ¶
func GetCurrentDevices ¶
func GetCurrentDevices() []string
GetCurrentDevices: Get devices like /dev/vd**
func UnmountMountPoint ¶
UnmountMountPoint Unmount host mount path
Types ¶
type DiskOptions ¶
type DiskOptions struct { VolumeName string `json:"kubernetes.io/pvOrVolumeName"` FsType string `json:"kubernetes.io/fsType"` VolumeId string `json:"volumeId"` }
DiskOptions define the disk parameters
type DiskPlugin ¶
type DiskPlugin struct {
// contains filtered or unexported fields
}
DiskPlugin define DiskPlugin
func (*DiskPlugin) Attach ¶
func (p *DiskPlugin) Attach(opts interface{}, nodeName string) utils.Result
Attach attach with NodeName and Options Attach: nodeName: regionId.instanceId, exammple: cn-hangzhou.i-bp12gei4ljuzilgwzahc Attach: options: {"kubernetes.io/fsType": "", "kubernetes.io/pvOrVolumeName": "", "kubernetes.io/readwrite": "", "volumeId":""}
func (*DiskPlugin) Detach ¶
func (p *DiskPlugin) Detach(volumeName string, nodeName string) utils.Result
Detach current kubelet call detach not provide plugin spec; this issue is tracked by: https://github.com/kubernetes/kubernetes/issues/52590
func (*DiskPlugin) GetDiskLocalConfig ¶
func (p *DiskPlugin) GetDiskLocalConfig() (string, string, string)
GetDiskLocalConfig read disk config from local file
func (*DiskPlugin) Getvolumename ¶
func (p *DiskPlugin) Getvolumename(opts interface{}) utils.Result
Getvolumename Support
func (*DiskPlugin) Mount ¶
func (p *DiskPlugin) Mount(opts interface{}, mountPath string) utils.Result
Mount Not Support
func (*DiskPlugin) Mountdevice ¶
func (p *DiskPlugin) Mountdevice(mountPath string, opts interface{}) utils.Result
Mountdevice Not Support
func (*DiskPlugin) NewOptions ¶
func (p *DiskPlugin) NewOptions() interface{}
NewOptions define NewOptions
func (*DiskPlugin) Unmount ¶
func (p *DiskPlugin) Unmount(mountPoint string) utils.Result
Unmount Support, to fix umount bug;
func (*DiskPlugin) Waitforattach ¶
func (p *DiskPlugin) Waitforattach(devicePath string, opts interface{}) utils.Result
Waitforattach Not Support