cleanup unneed code

This commit is contained in:
carlory
2025-04-09 17:04:20 +08:00
parent cacd595bae
commit 16f4a5c4ea
2 changed files with 1 additions and 15 deletions

View File

@@ -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"
}

View File

@@ -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
}