Documentation ¶
Index ¶
- Constants
- type Clients
- type Config
- type Dependencies
- type LocalStorage
- func (ls *LocalStorage) Delete()
- func (ls *LocalStorage) GetClientByNodeName(ctx context.Context, nodeName string) (provisioner.API, error)
- func (ls *LocalStorage) LocalPaths() []string
- func (ls *LocalStorage) Name() string
- func (ls *LocalStorage) StateColor() server.StateColor
- func (ls *LocalStorage) StorageClass() string
- func (ls *LocalStorage) StorageClassIsDefault() bool
- func (ls *LocalStorage) Update(apiObject *api.ArangoLocalStorage)
- func (ls *LocalStorage) Volumes() []server.Volume
- func (ls *LocalStorage) WrapLogger(in *zerolog.Event) *zerolog.Event
Constants ¶
const ( FinalizerNamespace = "localstorage.arangodb.com" FinalizerPersistentVolumeCleanup = FinalizerNamespace + "/cleanup" )
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 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