-
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
Remove all minikube dependencies from drivers #4933
Changes from all commits
05da539
812e815
3369ebc
d2ab336
5fcb676
b38e090
4a1e521
24fe0b4
80a5cab
2c9ab43
c5fb950
eda4d7a
efb9da6
3264f2e
b970b1c
be8b237
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,10 +25,6 @@ import ( | |
"syscall" | ||
"time" | ||
|
||
"k8s.io/minikube/pkg/minikube/config" | ||
"k8s.io/minikube/pkg/minikube/constants" | ||
"k8s.io/minikube/pkg/util" | ||
|
||
"github.com/docker/machine/libmachine/drivers" | ||
"github.com/docker/machine/libmachine/log" | ||
"github.com/docker/machine/libmachine/state" | ||
|
@@ -102,14 +98,8 @@ func NewDriver(hostName, storePath string) *Driver { | |
SSHUser: "docker", | ||
}, | ||
CommonDriver: &pkgdrivers.CommonDriver{}, | ||
Boot2DockerURL: constants.DefaultISOURL, | ||
CPU: constants.DefaultCPUS, | ||
DiskSize: util.CalculateSizeInMB(constants.DefaultDiskSize), | ||
Memory: util.CalculateSizeInMB(constants.DefaultMemorySize), | ||
PrivateNetwork: defaultPrivateNetworkName, | ||
Network: defaultNetworkName, | ||
DiskPath: filepath.Join(constants.GetMinipath(), "machines", config.GetMachineName(), fmt.Sprintf("%s.rawdisk", config.GetMachineName())), | ||
ISO: filepath.Join(constants.GetMinipath(), "machines", config.GetMachineName(), "boot2docker.iso"), | ||
ConnectionURI: qemusystem, | ||
} | ||
} | ||
|
@@ -224,7 +214,7 @@ func (d *Driver) GetSSHHostname() (string, error) { | |
|
||
// DriverName returns the name of the driver | ||
func (d *Driver) DriverName() string { | ||
return constants.DriverKvm2 | ||
return "kvm2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we make it a constant inside the driver? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep, done. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @afbjorklund As those are the driver names I consider they good for a constant. To always have only one place to change it, even though now we don't have many. But as always, no strong feelings. and probably a too simple thing to start a big discussion, so all good to revert it to string only :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, at least it's not using the constants module. But the string is only used in 1 or 2 places ? It's the not the most important thing, just thought it was an unnecessary step of indirection. |
||
} | ||
|
||
// Kill stops a host forcefully, including any containers that we are managing. | ||
|
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 make it a constant inside the driver?
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.
yep, done.
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.
I disagree :-P