storage

package
v0.0.0-...-02e4ef4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 43 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FinalizerNamespace = "localstorage.arangodb.com"

	FinalizerPersistentVolumeCleanup = FinalizerNamespace + "/cleanup"
)
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 Clients

type Clients map[string]provisioner.API

func (Clients) Copy

func (c Clients) Copy() Clients

func (Clients) Filter

func (c Clients) Filter(f func(node string, client provisioner.API) bool) Clients

func (Clients) Keys

func (c Clients) Keys() []string

type Config

type Config struct {
	Namespace      string
	PodName        string
	ServiceAccount string
}

Config holds configuration settings for a LocalStorage

type Dependencies

type Dependencies struct {
	Client        kclient.Client
	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(ctx context.Context, 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

func (*LocalStorage) WrapLogger

func (ls *LocalStorage) WrapLogger(in *zerolog.Event) *zerolog.Event

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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