volume

package
v5.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StatusSuccess represents the successful completion of command.
	StatusSuccess = "Success"
	// StatusNotSupported represents that the command is not supported.
	StatusNotSupported = "Not supported"
)

Variables

View Source
var ErrorTimeout = fmt.Errorf("Timeout")

ErrorTimeout defines the time error

Functions

func NewFlexProvisioner

func NewFlexProvisioner(client kubernetes.Interface, execCommand string, flexDriver string) controller.Provisioner

NewFlexProvisioner creates a new flex provisioner

Types

type DriverCall

type DriverCall struct {
	Execpath string
	Command  string
	Timeout  time.Duration
	// contains filtered or unexported fields
}

DriverCall implements the basic contract between FlexVolume and its driver. The caller is responsible for providing the required args.

func (*DriverCall) Append

func (dc *DriverCall) Append(arg string)

Append add arg to DriverCall

func (*DriverCall) AppendSpec

func (dc *DriverCall) AppendSpec(volumeOptions, extraOptions map[string]string) error

AppendSpec add all option parameters to DriverCall

func (*DriverCall) Run

func (dc *DriverCall) Run() (*DriverStatus, error)

Run the command with option parameters

type DriverCapabilities

type DriverCapabilities struct {
	Attach         bool `json:"attach"`
	SELinuxRelabel bool `json:"selinuxRelabel"`
}

DriverCapabilities represents the result of init command.

type DriverStatus

type DriverStatus struct {
	// Status of the callout. One of "Success", "Failure" or "Not supported".
	Status string `json:"status"`
	// Reason for success/failure.
	Message string `json:"message,omitempty"`
	// Path to the device attached. This field is valid only for attach calls.
	// ie: /dev/sdx
	DevicePath string `json:"device,omitempty"`
	// Cluster wide unique name of the volume.
	VolumeName string `json:"volumeName,omitempty"`
	// Represents volume is attached on the node
	Attached bool `json:"attached,omitempty"`
	// Returns capabilities of the driver.
	// By default we assume all the capabilities are supported.
	// If the plugin does not support a capability, it can return false for that capability.
	Capabilities *DriverCapabilities `json:",omitempty"`
}

DriverStatus represents the return value of the driver callout.

type OptionsForDriver

type OptionsForDriver map[string]string

OptionsForDriver represents the spec given to the driver.

func NewOptionsForDriver

func NewOptionsForDriver(volumeOptions, extraOptions map[string]string) (OptionsForDriver, error)

NewOptionsForDriver assemble all option parameters

Jump to

Keyboard shortcuts

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