Skip to content

Commit

Permalink
Don't track attachments of NFS volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
timebertt committed Oct 9, 2024
1 parent 97cd752 commit 1e44281
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/util/provider/drain/drain.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,13 @@ func (o *Options) getVolIDsFromDriver(ctx context.Context, pvNames []string) ([]
continue
}

// NFS volumes don't need to be attached to nodes only mounted, i.e., they won't appear in the
// node.status.volumesAttached section and there won't be any VolumeAttachments for it (as it's a built-in volume
// plugin, no CSI).
if pv.Spec.PersistentVolumeSource.NFS != nil {
continue
}

// Found PV; append and exit
pvSpecs = append(pvSpecs, &pv.Spec)
break
Expand Down

0 comments on commit 1e44281

Please sign in to comment.