-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
None driver #1173
None driver #1173
Conversation
@aaron-prindle does it support the case where docker is not installed/configured? thanks! |
@dims no, unfortunately this method would require having docker installed on the host machine |
Ack thanks i was scratching my head to see what i missed when i was poking at docker machine code before i ended up with #1152 |
I would love to see either this pull request or this one move forward. I think the idea is great and if it could work on a mac that would be even better. |
3f20952
to
f859f5a
Compare
Codecov Report
@@ Coverage Diff @@
## master #1173 +/- ##
==========================================
- Coverage 40.45% 39.52% -0.94%
==========================================
Files 50 50
Lines 2477 2548 +71
==========================================
+ Hits 1002 1007 +5
- Misses 1312 1375 +63
- Partials 163 166 +3
Continue to review full report at Codecov.
|
0495b0d
to
44f99fc
Compare
@minikube-bot retest this please |
44f99fc
to
9453860
Compare
@minikube-bot retest this please |
c4b1ec3
to
d7b44b1
Compare
5e37b36
to
9079795
Compare
9079795
to
9c0d967
Compare
Landing this would be great. The kvm vm eats way too much battery on my laptop :( Is there anything pending? |
I think this is pretty close, but we still won't really recommend using it on a laptop. localkube/kubernetes assume quite a bit of freedom on the host machine. |
Well, that is fair, at least I would be able to put on a compute instance somewhere then :) |
} | ||
|
||
if os.Getenv("CHANGE_MINIKUBE_NONE_USER") != "" { | ||
username := os.Getenv("SUDO_USER") |
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.
Should we bail out if this isn't set?
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.
done, will continue with no additional chown if SUDO_USER is not set
cmd/minikube/cmd/start.go
Outdated
if config.VMDriver == "none" { | ||
fmt.Println(`=================== | ||
WARNING: IT IS RECOMMENDED NOT TO RUN THE NONE DRIVER ON PERSONAL WORKSTATIONS | ||
The 'none' driver will run an insecure kubernetes apiserver as root that may leave the host vulnerable to attacks |
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.
Could you clarify that these are CSRF attacks?
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.
done
pkg/minikube/assets/vm_assets.go
Outdated
|
||
if os.Getenv("CHANGE_MINIKUBE_NONE_USER") != "" { | ||
username := os.Getenv("SUDO_USER") | ||
command := fmt.Sprintf("/bin/chown %s %s", username, targetPath) |
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.
Can we use os.Chown and os.Chgrp instead of shelling out?
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.
done. Also os.Chown appears to do the work of both chown and chgrp
Should also add precreate check for systemd |
a8f18a5
to
ec583d2
Compare
ec583d2
to
f4a8ece
Compare
@minikube-bot retest this please |
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.
Nice!
limitations under the License. | ||
*/ | ||
|
||
package drivers |
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.
We can do this in another PR later, but this should probably get moved into a subdirectory so we can have multiple drivers in here. Right now drivers.Driver will be this.
Hey folks. I arrived here via #99 (comment) and I'm wondering if it's still the intention to eventually use this to support running directly in Docker for Mac, or that's no longer the direction D4M users should be looking to go, since it looks like the existing |
This driver isn't intended to allow direct d4m use. We're looking at a few better options for Mac integration, but the current thinking is still to use our own VM, but re-use the d4m tooling: #1543 |
@dlorenc thanks for the speedy response and the pointer! |
This is a rough prototype of a minikube no-vm driver which moves all files into local locations and runs them as it does in the vm. All CLI commands are preserved. Currently the MINIKUBE_HOME directory needs to be configured and
minikube start
needs to be run as root.To test:
Note: This requires requires docker installed on the host