disk

package
v0.0.0-...-4f17fb6 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
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

View Source
var DEFAULT_REGION = common.Hangzhou

default region for aliyun sdk usage

View Source
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

func UnmountMountPoint(mountPath string) error

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

func (p *DiskPlugin) Init() utils.Result

Init define Init for DiskPlugin

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

Jump to

Keyboard shortcuts

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