persistentvolumeclaims

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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