Documentation
¶
Index ¶
- Constants
- func CleanUpMetadataFile(targetDir string) error
- func ReadJsonOptsFile(targetDir string, opts interface{}) error
- func WriteJsonOptsFile(targetDir string, opts interface{}) error
- type CephRBDOptsData
- type CinderVolumeOptsData
- type Driver
- type FlexVolume
- type FlexVolumeOptsData
- type GCEPDOptsData
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 ReadJsonOptsFile ¶ added in v1.10.0
func WriteJsonOptsFile ¶ added in v1.10.0
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
Click to show internal directories.
Click to hide internal directories.