mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Use correct pv annotation to fetch volume ID.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
ddea2dd56f
commit
6e6b5acbb5
@ -1085,8 +1085,8 @@ func getVolumeID(pv *v1.PersistentVolume, volumeName string) (string, error) {
|
||||
|
||||
// Get volID from pvspec if available, else fill it from volumename.
|
||||
if pv != nil {
|
||||
if pv.Annotations["VolID"] != "" {
|
||||
volumeID = pv.Annotations["VolID"]
|
||||
if pv.Annotations[heketiVolIDAnn] != "" {
|
||||
volumeID = pv.Annotations[heketiVolIDAnn]
|
||||
} else {
|
||||
volumeID = dstrings.TrimPrefix(volumeName, volPrefix)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user