persistentvolumeclaims

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 8 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.

Types

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 PersistentVolumeClaims

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

PersistentVolumeClaims is used to parse data from kubectl get pvc

func CreatePersistentVolumeClaimsFromFile

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

CreatePersistentVolumeClaimsFromFile will create a StorageClass from file with a name

func Get

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

Get will return a PersistentVolumeClaims with a given name and namespace

func (*PersistentVolumeClaims) Delete

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

Delete will delete a PersistentVolumeClaims in a given namespace

func (*PersistentVolumeClaims) WaitOnReady

func (pvc *PersistentVolumeClaims) WaitOnReady(namespace string, sleep, duration time.Duration) (bool, error)

WaitOnReady will block until PersistentVolumeClaims 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