Skip to content

Commit

Permalink
Clarify IsMountPoint comment for mount-s3 logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaeenie committed Dec 18, 2024
1 parent 02466c0 commit ba35933
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/driver/node/mounter/systemd_mounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ func NewSystemdMounter(mpVersion string, kubernetesVersion string) (*SystemdMoun
}

// IsMountPoint returns whether given `target` is a `mount-s3` mount.
// We implement the IsMountPoint interface instead of using Kubernetes' implementation
// because we need to verify not only that the target is a mount point but also that it is specifically a mount-s3 mount point.
// This is achieved by calling the mounter.List() method to enumerate all mount points.
func (m *SystemdMounter) IsMountPoint(target string) (bool, error) {
if _, err := os.Stat(target); os.IsNotExist(err) {
return false, err
Expand Down

0 comments on commit ba35933

Please sign in to comment.