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
minikube: Use localkube #31621
minikube: Use localkube #31621
Conversation
This works perfectly fine.
|
- if err != nil { | ||
- return errors.Wrap(err, "Error updating localkube from uri") | ||
- } | ||
+ localkubeFile = assets.NewBinDataAsset("out/localkube", "/usr/local/bin", "localkube", "0777") |
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.
How does this work?
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.
The old behaviour (we made use) of was that minikube came with a local version of localkube
.
In 0.23.0 this was changed so that minikube itself is much thinner and auto-downloads localkube
. This patch reverts to using the local locations again.
Technically, this command looks in three locations and requires one of them to exist. out/localkube
is what will kick in for us. But I kept the other two locations to stay with the original code.
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.
Ah I just reacted negatively to the /usr/local/bin 😄 I'd probably take that out. Feels really weird to be intentionally patching in an impure location (even if unused), especially to someone who doesn't know intimately how the code works (and who runs on a platform without a working sandbox) 😄 feels like someone adjusting the expression in future might accidentally fall through to impure behavior.
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.
Makes sense, I'll take it out tomorrow morning
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.
Thanks! Otherwise it looks great, and thanks for fixing it!
@grahamc any idea how we ended up with both |
0abf0c7
to
aac784f
Compare
@copumpkin if master or the branch fails to evaluate it assumed 0.... Then when it was fixed, it was too lazy to remove out of date labels. :) Both of these have been fixed today. |
Motivation for this change
Fixes #31602
The minikube guys changed the behaviour of how they load localkube.
Since they always try to download a remote version and store it (in /nix/store for us), the remote pull did not work.
This reverts to the old behaviour that uses the bundled localkube
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)/cc @moretea