flexvolume

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolIdKey = "volumeID"

	HyperFlexvolumeDataFile = "hyper-flexvolume.json"

	// Cinder flexvolume
	CinderConfigKey  = "cinderConfig"
	CinderConfigFile = "/etc/kubernetes/cinder.conf"

	// GCE PD flexvolume
	ZoneKey    = "zone"
	ProjectKey = "project"

	// Ceph RBD flexvolume
	PoolKey            = "pool"
	CephRBDConfigFile  = "/etc/ceph/ceph.conf"
	CephRBDKeyringFile = "/etc/ceph/ceph.client.admin.keyring"
	DefaultCephRBDPool = "hyper"

	// Build-in fsType key of flexvolume
	SystemFsTypeKey = "kubernetes.io/fsType"
	DefaultFsType   = "ext4"
)

Variables

This section is empty.

Functions

func CleanUpMetadataFile added in v1.10.0

func CleanUpMetadataFile(targetDir string) error

func ReadJsonOptsFile added in v1.10.0

func ReadJsonOptsFile(targetDir string, opts interface{}) error

func WriteJsonOptsFile added in v1.10.0

func WriteJsonOptsFile(targetDir string, opts interface{}) error

Types

type CephRBDOptsData added in v1.12.0

type CephRBDOptsData struct {
	VolumeID string   `json:"volumeID"`
	Pool     string   `json:"pool"`
	FsType   string   `json:"fsType"`
	User     string   `json:"user"`
	Keyring  string   `json:"keyring"`
	Monitors []string `json:"monitors"`
}

CephRBDOptsData is the struct of json file

type CinderVolumeOptsData added in v1.10.0

type CinderVolumeOptsData struct {
	// Needed to reconstruct new cinder clients
	ConfigKey string `json:"cinderConfig"`
	VolumeID  string `json:"volumeID"`

	// rbd volume details
	VolumeType string   `json:"volume_type"`
	Name       string   `json:"name"`
	FsType     string   `json:"fsType"`
	Hosts      []string `json:"hosts"`
	Ports      []string `json:"ports"`
}

CinderVolumeOptsData is the struct of json file

type Driver added in v1.12.0

type Driver interface {
	Init() (map[string]interface{}, error)
	Attach(jsonOptions, nodeName string) (map[string]interface{}, error)
	Detach(mountDev, nodeName string) (map[string]interface{}, error)
	WaitForAttach(mountDev, jsonOptions string) (map[string]interface{}, error)
	IsAttached(jsonOptions, nodeName string) (map[string]interface{}, error)
	Mount(targetMountDir, jsonOptions string) (map[string]interface{}, error)
	Unmount(targetMountDir string) (map[string]interface{}, error)
}

type FlexVolume added in v1.12.0

type FlexVolume struct {
	Driver
	// contains filtered or unexported fields
}

func NewFlexVolume added in v1.12.0

func NewFlexVolume(d Driver) *FlexVolume

func (*FlexVolume) Run added in v1.12.0

func (d *FlexVolume) Run(args []string) string

type FlexVolumeOptsData added in v1.10.0

type FlexVolumeOptsData struct {
	CinderData  *CinderVolumeOptsData `json:"cinderVolumeOptsData,omitempty"`
	GCEPDData   *GCEPDOptsData        `json:"gCEPDOptsData,omitempty"`
	CephRBDData *CephRBDOptsData      `json:"cephRBDOptsData,omitempty"`
}

type GCEPDOptsData added in v1.10.0

type GCEPDOptsData struct {
	// Needed for unmount
	VolumeID string `json:"volumeID"`
	Zone     string `json:"zone"`
	Project  string `json:"project"`

	// gce pd volume details
	DevicePath string `json:"devicePath"`
	FsType     string `json:"fsType"`
}

GCEPDOptsData is the struct of json file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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