persistentvolumeclaims

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Describe

func Describe(pvcName, namespace string) error

Describe gets the description for the given pvc and namespace.

func WaitOnDeleted added in v0.36.0

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

WaitOnDeleted returns when a pvc is successfully deleted

Types

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 jobs 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) WaitOnReady added in v0.36.0

func (pvc *PersistentVolumeClaim) WaitOnReady(namespace string, sleep, duration 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