-
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 initial docker unit #1851
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1851 +/- ##
==========================================
- Coverage 36.27% 36.25% -0.03%
==========================================
Files 51 51
Lines 3462 3462
==========================================
- Hits 1256 1255 -1
- Misses 2023 2024 +1
Partials 183 183
Continue to review full report at Codecov.
|
Makefile
Outdated
@@ -95,7 +95,7 @@ out/localkube: $(shell $(LOCALKUBEFILES)) | |||
ifeq ($(LOCALKUBE_BUILD_IN_DOCKER),y) | |||
$(KUBE_CROSS_DOCKER_CMD) make $@ | |||
else | |||
CGO_ENABLED=1 go build -tags static_build,netgo -ldflags=$(LOCALKUBE_LDFLAGS) -o $(BUILD_DIR)/localkube ./cmd/localkube |
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.
Looks like this has your netgo removal commit as well, want to merge that then rebase this one?
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 that was the plan
pkg/util/utils.go
Outdated
@@ -205,3 +205,30 @@ func MaybeChownDirRecursiveToMinikubeUser(dir string) error { | |||
} | |||
return nil | |||
} | |||
|
|||
func CopyFile(src, dst string) 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.
We don't have anything for copying already?
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.
Actually we have CopyFileLocal. I'll use that. This was just cherry-picked from an old branch
pkg/provision/buildroot.go
Outdated
return errors.Wrap(err, "error getting ip during provisioning") | ||
} | ||
|
||
if err := util.CopyFile(authOptions.CaCertPath, filepath.Join(authOptions.StorePath, "ca.pem")); err != nil { |
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 put these into a loop[ going over the map you have on 229 somehow?
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.
Oops, I think that was the point of the map down there anyways. I'll change that
The docker daemon initially starts up in the ISO, only to be stopped and replaced by minikube's custom configuration. This removes the initial unit, so that docker doesn't automatically start up until minikube restarts it with its configuration.
ff2667f
to
dbbffab
Compare
The current implementation assumes that we already have docker running. This switches it to not remove any previous docker configuration (since there isn't any), and uses our native file transfer utils instead of the printf commands.
dbbffab
to
0db44af
Compare
@minikube-bot retest this please |
Fixes #1811
This delete the default docker configuration in the minikube iso. This should slightly decrease start time. I ran into #1811 when caching images.
I've also cherry picked ff2667f, since that seems to fix all the flakiness we've been seeing with the integration tests.
Summaries from the commits:
The docker daemon initially starts up in the ISO, only to be stopped
and replaced by minikube's custom configuration. This removes the
initial unit, so that docker doesn't automatically start up until
minikube restarts it with its configuration.
Rewrite configureAuth
The current implementation assumes that we already have docker running.
This switches it to not remove any previous docker configuration
(since there isn't any), and uses our native file transfer utils
instead of the printf commands.
Also, the CopyLocal function can be deleted and the
bootstrapper.ExecRunner.Copy
can be used. Its included since the CommandRunner isn't merged yet.