mirror of
https://github.com/outbackdingo/kubernetes.git
synced 2026-01-27 18:19:28 +00:00
cleanup unneed code
This commit is contained in:
@@ -26,9 +26,6 @@ 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
|
||||
@@ -42,9 +39,3 @@ 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"
|
||||
}
|
||||
|
||||
@@ -2618,12 +2618,7 @@ func printVolumeAttributesClass(obj *storage.VolumeAttributesClass, options prin
|
||||
Object: runtime.RawExtension{Object: obj},
|
||||
}
|
||||
|
||||
name := obj.Name
|
||||
if storageutil.IsDefaultAnnotationForVolumeAttributesClass(obj.ObjectMeta) {
|
||||
name += " (default)"
|
||||
}
|
||||
|
||||
row.Cells = append(row.Cells, name, obj.DriverName, translateTimestampSince(obj.CreationTimestamp))
|
||||
row.Cells = append(row.Cells, obj.Name, obj.DriverName, translateTimestampSince(obj.CreationTimestamp))
|
||||
|
||||
return []metav1.TableRow{row}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user