mirror of https://github.com/k3s-io/k3s
Merge pull request #58626 from humblec/correct-ann
Automatic merge from submit-queue (batch tested with PRs 58626, 58791). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Use correct pv annotation to fetch volume ID. Fix , Issue #58627 Signed-off-by: Humble Chirammal <hchiramm@redhat.com> **What this PR does / why we need it**: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```pull/6/head
commit
48c5e90d3b
|
@ -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