-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap mount.Interface to our own interface #1875
Conversation
type Mounter interface { | ||
Mount(source string, target string, fstype string, options []string) error | ||
Unmount(target string) error | ||
IsLikelyNotMountPoint(file string) (bool, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual mounter interface we really need and the only place where we import the actual third party implementation.
Indeed it should be relatively simple to use another implementation, we could even provide our own in order to reduce third party dependencies.
4db35b3
to
a636ec3
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1875 +/- ##
==========================================
- Coverage 75.96% 72.47% -3.50%
==========================================
Files 66 69 +3
Lines 6912 7274 +362
==========================================
+ Hits 5251 5272 +21
- Misses 1290 1624 +334
- Partials 371 378 +7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
a636ec3
to
4760132
Compare
Signed-off-by: David Cassany <[email protected]>
4760132
to
99367c0
Compare
This sets the actual mount interface we need in elemental and wraps
k8s.io/mount-utils
use in a single place. This makes our mounter interface way easier to substitute by another implementation if needed at some point. It also makes evident we need a simple mount interface.Part of #1874