persistentvolumeclaims

package
v0.43.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DescribePVCs added in v0.41.0

func DescribePVCs(pvcPrefix, namespace string)

DescribePVCs describes all pvcs whose name matches a substring

func WaitOnDeleted added in v0.36.0

func WaitOnDeleted(pvcPrefix, namespace string, sleep, timeout time.Duration) (bool, error)

WaitOnDeleted returns when a pvc is successfully deleted

Types

type GetAllByPrefixResult added in v0.41.0

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

GetAllByPrefixResult is a return struct for GetAllByPrefixAsync

func GetAllByPrefixAsync added in v0.41.0

func GetAllByPrefixAsync(prefix, namespace string) GetAllByPrefixResult

GetAllByPrefixAsync wraps Get with a struct response for goroutine + channel usage

type GetResult added in v0.41.0

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

GetResult is a return struct for GetAsync

func GetAsync added in v0.41.0

func GetAsync(pvcName, namespace string) GetResult

GetAsync wraps Get with a struct response for goroutine + channel usage

type List added in v0.36.0

type List struct {
	PersistentVolumeClaims []PersistentVolumeClaim `json:"items"`
}

func GetAll added in v0.36.0

func GetAll(namespace string) (*List, error)

GetAll will return all pvcs in a given namespace

type Metadata

type Metadata struct {
	CreatedAt time.Time `json:"creationTimestamp"`
	Name      string    `json:"name"`
	Namespace string    `json:"namespace"`
}

Metadata holds information like name, create time, and namespace

type PersistentVolumeClaim added in v0.36.0

type PersistentVolumeClaim struct {
	Metadata Metadata `json:"metadata"`
	Spec     Spec     `json:"spec"`
	Status   Status   `json:"status"`
}

PersistentVolumeClaim is used to parse data from kubectl get pvc

func CreatePVCFromFileDeleteIfExist added in v0.36.0

func CreatePVCFromFileDeleteIfExist(filename, name, namespace string) (*PersistentVolumeClaim, error)

CreatePVCFromFileDeleteIfExist will create a PVC from file with a name

func CreatePersistentVolumeClaimsFromFile

func CreatePersistentVolumeClaimsFromFile(filename, name, namespace string) (*PersistentVolumeClaim, error)

CreatePersistentVolumeClaimsFromFile will create a PVC from file with a name

func Get

func Get(pvcName, namespace string) (*PersistentVolumeClaim, error)

Get will return a PersistentVolumeClaim with a given name and namespace

func GetAllByPrefix added in v0.36.0

func GetAllByPrefix(prefix, namespace string) ([]PersistentVolumeClaim, error)

GetAllByPrefix will return all pvcs in a given namespace that match a prefix

func (*PersistentVolumeClaim) Delete added in v0.36.0

func (pvc *PersistentVolumeClaim) Delete(retries int) error

Delete will delete a PersistentVolumeClaim in a given namespace

func (*PersistentVolumeClaim) Describe added in v0.41.0

func (pvc *PersistentVolumeClaim) Describe() error

Describe will describe a pv resource

func (*PersistentVolumeClaim) WaitOnReady added in v0.36.0

func (pvc *PersistentVolumeClaim) WaitOnReady(namespace string, sleep, timeout time.Duration) (bool, error)

WaitOnReady will block until PersistentVolumeClaim is available

type Spec

type Spec struct {
	StorageClassName string `json:"storageClassName"`
	VolumeName       string `json:"volumeName"`
}

Spec holds information like storageClassName, volumeName

type Status

type Status struct {
	Phase string `json:"phase"`
}

Status holds information like phase

Jump to

Keyboard shortcuts

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