mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-03 21:04:47 +00:00
volumeattributesclass and core api changes
This commit is contained in:
@@ -26,6 +26,9 @@ const IsDefaultStorageClassAnnotation = "storageclass.kubernetes.io/is-default-c
|
||||
// TODO: remove Beta when no longer used
|
||||
const BetaIsDefaultStorageClassAnnotation = "storageclass.beta.kubernetes.io/is-default-class"
|
||||
|
||||
// AlphaIsDefaultVolumeAttributesClassAnnotation is the alpha version of IsDefaultVolumeAttributesClassAnnotation.
|
||||
const AlphaIsDefaultVolumeAttributesClassAnnotation = "volumeattributesclass.alpha.kubernetes.io/is-default-class"
|
||||
|
||||
// IsDefaultAnnotation returns a boolean if
|
||||
// the annotation is set
|
||||
// TODO: remove Beta when no longer needed
|
||||
@@ -39,3 +42,9 @@ func IsDefaultAnnotation(obj metav1.ObjectMeta) bool {
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// IsDefaultAnnotationForVolumeAttributesClass returns a boolean if
|
||||
// the annotation is set
|
||||
func IsDefaultAnnotationForVolumeAttributesClass(obj metav1.ObjectMeta) bool {
|
||||
return obj.Annotations[AlphaIsDefaultVolumeAttributesClassAnnotation] == "true"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user