pvc

package
v2.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadSubVolumePathFromMeta

func ReadSubVolumePathFromMeta(path string) (string, error)

func ResolveSubVolumeName

func ResolveSubVolumeName(pv *v1.PersistentVolume) (string, error)

Types

type Collection

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

func NewCollection added in v2.1.8

func NewCollection(ctx context.Context, cephConfig *config.CephFs, options ...collector.ConfigManipulator) (*Collection, error)

NewCollection creates a new continuously updated Collection for PVC objects ensure to provide a K8s API configuration in the given context given K8s API Client in the context is either reused or new client is created if not existing

func (*Collection) Add

func (v *Collection) Add(obj runtime.Object) error

func (*Collection) All

func (v *Collection) All() map[Key]*Value

All returns a new copy of the pvc collection for safe iteration

func (*Collection) Delete

func (v *Collection) Delete(obj runtime.Object) error

func (*Collection) Filter

func (v *Collection) Filter(filter func(key Key, value *Value) bool) map[Key]*Value

Filter will return a filtered copy of the pvc collection for save iteration

func (*Collection) Modify

func (v *Collection) Modify(obj runtime.Object) error

type Key

type Key struct {
	Key       string
	Namespace string
}

type Value

type Value struct {
	Error          error
	FullVolumePath string
	PVC            *coreV1.PersistentVolumeClaim

	// Note: PV can be nil, e.g for unbound PVCs
	PV *coreV1.PersistentVolume
}

Jump to

Keyboard shortcuts

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