storage

package
v0.0.0-...-d3ccc4f Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// AnnProvisionedBy is the external provisioner annotation in PV object
	AnnProvisionedBy = "pv.kubernetes.io/provisioned-by"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Namespace      string
	PodName        string
	ServiceAccount string
}

Config holds configuration settings for a LocalStorage

type Dependencies

type Dependencies struct {
	Log           zerolog.Logger
	KubeCli       kubernetes.Interface
	StorageCRCli  versioned.Interface
	EventRecorder record.EventRecorder
}

Dependencies holds dependent services for a LocalStorage

type LocalStorage

type LocalStorage struct {
	// contains filtered or unexported fields
}

LocalStorage is the in process state of an ArangoLocalStorage.

func New

func New(config Config, deps Dependencies, apiObject *api.ArangoLocalStorage) (*LocalStorage, error)

New creates a new LocalStorage from the given API object.

func (*LocalStorage) Delete

func (ls *LocalStorage) Delete()

Delete the local storage. Called when the local storage was deleted by the user.

func (*LocalStorage) GetClientByNodeName

func (ls *LocalStorage) GetClientByNodeName(nodeName string) (provisioner.API, error)

GetClientByNodeName looks for a client that serves the given node name. Returns an error if no such client is found.

func (*LocalStorage) LocalPaths

func (ls *LocalStorage) LocalPaths() []string

LocalPaths returns the local paths (on nodes) of the local storage resource

func (*LocalStorage) Name

func (ls *LocalStorage) Name() string

Name returns the name of the local storage resource

func (*LocalStorage) StateColor

func (ls *LocalStorage) StateColor() server.StateColor

StateColor returns a color describing the state of the local storage resource

func (*LocalStorage) StorageClass

func (ls *LocalStorage) StorageClass() string

StorageClass returns the name of the StorageClass specified in the local storage resource

func (*LocalStorage) StorageClassIsDefault

func (ls *LocalStorage) StorageClassIsDefault() bool

StorageClassIsDefault returns true if the StorageClass used by this local storage resource is supposed to be default

func (*LocalStorage) Update

func (ls *LocalStorage) Update(apiObject *api.ArangoLocalStorage)

Update the local storage. This sends an update event in the event queue.

func (*LocalStorage) Volumes

func (ls *LocalStorage) Volumes() []server.Volume

Volumes returns all volumes created by the local storage resource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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