Skip to content
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

Allow installation from remote manifests without downloading the bundle #193

Closed
corneliusweig opened this issue May 30, 2019 · 6 comments
Closed
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@corneliusweig
Copy link
Contributor

I find it annoying that I need to download the file bundle and the manifest when testing a krew-index PR. It could be much simpler, if krew would accept remote URIs for the manifest location and if krew would download the file bundle referenced in there. Is there a particular reason why krew must not do this?

Thinking further, krew should keep track of the manifest URIs if not coming from the krew index. On krew update, it should then also download new versions from those URIs and handle those just as any other plugin. This would then allow plugin authors to maintain their own krew manifest within the plugin repo with all the benefits of krew (easy install, updates).

WDYT?

@ahmetb
Copy link
Member

ahmetb commented May 30, 2019

You can easily do

--manifest <(curl url) --archive <(curl url)

We discussed this in early days and decided not to add more magic and rely on unix conventions. Maybe it’s worth documenting though.

@corneliusweig
Copy link
Contributor Author

corneliusweig commented May 30, 2019

Well I would argue that the cmd-line hack is less practical. After all, you need to copy/paste two different urls, not just one:

--manifest <(curl manifest-url) --archive <(curl archive-url)

BTW, what do you think about the idea of keeping track of the manifest URLs so that they can be updated during krew update?

EDIT contrary to my statement above the --archive option was never necessary. This has always been sufficient:

--manifest <(curl manifest-url)

@ahmetb
Copy link
Member

ahmetb commented May 31, 2019

To test manifests in index repo, I have the refined-github extension, so I can click Copy to copy manifest file contents into clipboard, then I have this alias:

krew_install_clipboard="kubectl krew install --manifest <(pbpaste)"

so I just run krew_install_clipboard. That's just my personal workflow.

BTW, what do you think about the idea of keeping track of the manifest URLs so that they can be updated during krew update?

We shouldn't go down this path. One-off installations are meant only for dev/test. We provide the --manifest/--archive just to ease local development experience. Once we start supporting multiple indexes, I don't think there will be a real need for non-developers to use --manifest/--archive.

@corneliusweig
Copy link
Contributor Author

But that's exactly the point: if the location of plugins is recorded, they are no longer one-off. In a way, this is the multiple indexes approach in the extreme, where every plugin manifest is maintained in its own repository.
In contrast to multiple indexes, this would allow plugin authors to benefit from easy krew installation (+updates) without the need to add the plugin to an index.

@ahmetb
Copy link
Member

ahmetb commented Jun 3, 2019

The only problem I see with that is it ends up creating two paths for obtaining manifests. One being a local git repo that’s refreshed directly/indirectly via krew update; another one that comes from a permalink/URL directly.

I think once we figure out #195 and #23, we can revisit this idea. Perhaps there will be a way to configure non-git indexes, and one could be a direct URL reference as you proposed here.

/priority awaiting-more-evidence

@k8s-ci-robot k8s-ci-robot added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Jun 3, 2019
@corneliusweig
Copy link
Contributor Author

@ahmetb's shell alias also works on Linux, for example with

kubectl krew install --manifest <(xclip -o)

Therefore, there's no need for such a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

3 participants