util

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const AlphaStorageClassAnnotation = "volume.alpha.kubernetes.io/storage-class"

AlphaStorageClassAnnotation represents the previous alpha storage class annotation. it's no longer used and held here for posterity.

View Source
const BetaIsDefaultStorageClassAnnotation = "storageclass.beta.kubernetes.io/is-default-class"
View Source
const BetaStorageClassAnnotation = "volume.beta.kubernetes.io/storage-class"

BetaStorageClassAnnotation represents the beta/previous StorageClass annotation. It's currently still used and will be held for backwards compatibility

View Source
const IsDefaultStorageClassAnnotation = "storageclass.beta.kubernetes.io/is-default-class"

IsDefaultStorageClassAnnotation represents a StorageClass annotation that marks a class as the default StorageClass TODO: Update IsDefaultStorageClassannotation and remove Beta when no longer used

View Source
const StorageClassAnnotation = "volume.beta.kubernetes.io/storage-class"

StorageClassAnnotation represents the storage class associated with a resource. It currently matches the Beta value and can change when official is set.

  • in PersistentVolumeClaim it represents required class to match. Only PersistentVolumes with the same class (i.e. annotation with the same value) can be bound to the claim. In case no such volume exists, the controller will provision a new one using StorageClass instance with the same name as the annotation value.
  • in PersistentVolume it represents storage class to which the persistent volume belongs.

TODO: Update this to final annotation value as it matches BetaStorageClassAnnotation for now

Variables

This section is empty.

Functions

func GetClaimStorageClass

func GetClaimStorageClass(claim *api.PersistentVolumeClaim) string

GetClaimStorageClass returns name of class that is requested by given claim. Request for `nil` class is interpreted as request for class "", i.e. for a classless PV. TODO: change to PersistentVolumeClaim.Spec.Class value when this attribute is introduced.

func GetStorageClassAnnotation

func GetStorageClassAnnotation(obj api.ObjectMeta) string

GetStorageClassAnnotation returns the StorageClass value if the annotation is set, empty string if not TODO: remove Alpha and Beta when no longer used or needed

func GetVolumeStorageClass

func GetVolumeStorageClass(volume *api.PersistentVolume) string

GetVolumeStorageClass returns value of StorageClassAnnotation or empty string in case the annotation does not exist. TODO: change to PersistentVolume.Spec.Class value when this attribute is introduced.

func HasStorageClassAnnotation

func HasStorageClassAnnotation(obj api.ObjectMeta) bool

HasStorageClassAnnotation returns a boolean if the annotation is set TODO: remove Alpha and Beta when no longer used or needed

func IsDefaultAnnotation

func IsDefaultAnnotation(obj api.ObjectMeta) bool

IsDefaultAnnotation returns a boolean if the annotation is set TODO: remove Beta when no longer needed

func IsDefaultAnnotationText

func IsDefaultAnnotationText(obj api.ObjectMeta) string

IsDefaultAnnotationText returns a pretty Yes/No String if the annotation is set TODO: remove Beta when no longer needed

Types

This section is empty.

Jump to

Keyboard shortcuts

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