kubernetesk8s.io/kubernetes/pkg/apis/storage/util Index | Files

package util

import "k8s.io/kubernetes/pkg/apis/storage/util"

Index

Constants

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.

const BetaIsDefaultStorageClassAnnotation = "storageclass.beta.kubernetes.io/is-default-class"
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

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

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.

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

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

Source Files

helpers.go

Version
v1.5.0-beta.2
Published
Nov 24, 2016
Platform
js/wasm
Imports
1 packages
Last checked
3 minutes ago

Tools for package owners.