kubernetesk8s.io/kubernetes/pkg/volume/flexvolume Index | Files

package flexvolume

import "k8s.io/kubernetes/pkg/volume/flexvolume"

Index

Constants

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

Variables

var (
	TimeoutError = fmt.Errorf("Timeout")
)

Functions

func NewFlexVolumePlugin

func NewFlexVolumePlugin(pluginDir, name string) (volume.VolumePlugin, error)

func ProbeVolumePlugins

func ProbeVolumePlugins(pluginDir string) []volume.VolumePlugin

This is the primary entrypoint for volume plugins.

Types

type DriverCall

type DriverCall struct {
	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)

func (*DriverCall) AppendSpec

func (dc *DriverCall) AppendSpec(spec *volume.Spec, host volume.VolumeHost, extraOptions map[string]string) error

func (*DriverCall) Run

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

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 map[string]bool
}

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(spec *volume.Spec, host volume.VolumeHost, extraOptions map[string]string) (OptionsForDriver, error)

Source Files

attacher-defaults.go attacher.go detacher-defaults.go detacher.go driver-call.go mounter-defaults.go mounter.go plugin-defaults.go plugin.go probe.go unmounter-defaults.go unmounter.go util.go volume.go

Version
v1.7.8
Published
Oct 5, 2017
Platform
js/wasm
Imports
19 packages
Last checked
47 seconds ago

Tools for package owners.