-
Notifications
You must be signed in to change notification settings - Fork 370
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
The future of symlinks in krew
s installation procedure
#643
Comments
/lifecycle frozen This needs input from Windows users. We fail krew's installation on Windows early on with a message indicating elevated access. From my experience, most of the time, you want to be on a privileged shell (cmd or PS) to get things done, so it's expected. If it's been blocking users (we don't know that) we should probably think of a solution. Otherwise, having two different installation methods is less than ideal for maintenance reasons. |
Hi, I am on a corporate laptop and we face exactly this restriction, for this reason we cant rollout krew to 200+ developers within our organization. Currently this is the only problem we face, we are not able to create the symlinks... as a workaround we copy the files and rename them... however since it fails there is no receipt file created, so in the end it fails... as a workaround what I usually do is install on my personal laptop and then send a zip of .krew with all the exec there, and again copy the execs from the store to the bin, since symlinks fail... this is less than ideal I would say it would be fairly simply to implement a proper mode for this... instead of symlink, create a copy with the version associated. It would of course be a lot larger than using the symlinks since we would have duplicates of the execs, but at least it would work. |
Hai there, If I remember correctly scoop is using the mechanism mentioned by @webmutation. While updating there is a "new" folder and as the last step everything is copied to a "current" folder. Well at least it could make some Windows User pretty happy 😊 |
@corneliusweig I agree with the problem, it doesn't seem there will be a clean solution. However, right now it won't be feasible to copy all plugins’ files into ~/.krew/bin (as it'll turn into a DLL hell, will overwrite other plugins’ files/.dll's). What’s a proper solution here? Hardlinks? /priority P2 |
Hey it's been a few years but I'd like to add my experience here. I'm running WSL so I have Krew working there but I'd also like to get it running on Windows. Using Krew version v0.4.4 on Windows 10 Version 10.0.19045 Build 19045. I am able to use admin rights but it's a corporate machine with unknown policies applied. Running the installation process (with admin CMD) results in errors for symlink creation
Then when I manually copy the executable to
I'm not sure where to go from here to get it working. |
Any update on this? I've just given up on installing Krew again on my company Windows machine. 🤔
|
Krew tries hard to not break an existing plugin installation, if something during install goes awry. To that end, krew uses symlinks to create a pointer from
$KREW_HOME/bin/kubectl-<plugin_name>
into the fully prepared plugin folder$KREW_HOME/store/<plugin_name>/v1.0/my-exe
. This can happen very late in the installation procedure and is pretty much atomic. The only thing that could fail thereafter is removing the previous plugin version folder, which would take up space but is harmless otherwise.This has worked pretty well for all UNIX like systems which support symlinks.
However, it pretty much failed for Windows, because the installation user needs administrator privileges to create symlinks on Windows. Thus we need to recommend installation with admin privileges, which is pretty sad.
As a consequence, I think that far less Windows users want or can adopt
krew
and our reach stays below its potential (think about users on corp machines). Therefore, let's discuss if we can come up with an installation procedure that does not require symlinks. I think we need to balance the potential impact against the risk of less reliable installation on other OSes.The text was updated successfully, but these errors were encountered: