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

[RFE] Submitting kubeplus kublet plugins to Krew plugin index #1328

Open
chiukapoor opened this issue Jul 11, 2024 · 3 comments
Open

[RFE] Submitting kubeplus kublet plugins to Krew plugin index #1328

chiukapoor opened this issue Jul 11, 2024 · 3 comments

Comments

@chiukapoor
Copy link
Contributor

Proposal

I want to propose submitting KubePlus to the Krew plugin index. Krew is a package manager for kubectl plugins, making it easier for users to discover, install, and manage kubectl plugins. By submitting KubePlus to Krew, we can significantly increase its visibility and adoption within the Kubernetes community.

Benefits:

  • Increased Visibility: Krew is widely used by the Kubernetes community. Listing KubePlus on Krew will increase its visibility and adoption.
  • Simplified Installation: Users can install KubePlus with a single command (kubectl krew install kubeplus), simplifying the installation process.
  • Ease of Updates: Krew manages plugin versions and updates, making it easier for users to keep KubePlus up to date.
  • Community Engagement: Being part of the Krew index can lead to greater community engagement and contributions.

Requirements:

This is not an exhaustive list of requirements but some that I gathered from https://krew.sigs.k8s.io/docs/developer-guide/release/new-plugin/

Plugin Naming:

  • The plugin name should be concise, descriptive, and follow the naming conventions specified by Krew. Avoid overly generic names.

Platform Support:

  • The plugin must support at least Linux and macOS. Windows support is optional but encouraged. The binaries for each supported platform must be provided.

Plugin Manifest:

  • A manifest file in YAML format must be created for the plugin. This file describes the plugin, including its version, URL, SHA256 checksums, and supported platforms. The manifest must include all required fields as per the Krew documentation.

Compliance with Krew Guidelines:

  • The plugin must comply with the Krew plugin guidelines, including proper error handling, adhering to security best practices, and providing a good user experience.

Installation and Uninstallation:

  • The plugin must be installable and uninstallable using Krew without manual intervention. The plugin should clean up all resources it creates upon uninstallation.
@devdattakulkarni
Copy link
Contributor

Thanks @chiukapoor for asking about krew.

Previously we have considered submitting kubeplus kubectl plugins to krew. But, we did not go through with it mainly due to the reason that kubeplus plugins cannot be used without kubeplus being first installed on the cluster. The utility of kubeplus kubectl plugins is for the specific use-case of multi-instance multi-tenancy. My understanding is that the plugins that are in the krew index are more generic in nature. They can be used on any k8s cluster, without requiring any component to be installed on the cluster first.

If there are any plugins in the krew index that are not generic and require some component to be installed on the cluster first, we can follow that example. Otherwise, I would say we can revisit this sometime in the future (possibly when non-generic plugins start getting included more and more into krew).

Let me know your thoughts.

@chiukapoor
Copy link
Contributor Author

chiukapoor commented Jul 14, 2024

@devdattakulkarni Thank you for the perspective and for pointing out that Krew mostly indexes generic plugins.

I went through the Krew plugin index and found non-generic plugins which require some component to be installed, for example cost plugin which requires kubecost to be installed which is mentioned in the caveats

https://github.com/kubernetes-sigs/krew-index/blob/da9bb5ad8cbd16d0bb3be0e777f62a080a993859/plugins/cost.yaml#L18-L20

The same applies to datadog plugin https://github.com/kubernetes-sigs/krew-index/blob/master/plugins/datadog.yaml

Similarly we may add kubeplus plugin to krew-index with a requirement for kubeplus operator to be installed.

@devdattakulkarni
Copy link
Contributor

devdattakulkarni commented Jul 16, 2024

Thanks @chiukapoor

We can potentially consider contributing following plugins to krew:

  • kubectl appresources
  • kubectl applogs
  • kubectl appurl
  • kubectl metrics

These plugins provide the overall experience of multi-instance multi-tenancy. One can check all the application resources created (kubectl appresources), retrieve application url (kubectl appurl), get application logs (kubectl applogs) and get application metrics (kubectl metrics).

kubectl connections uses compiled binary from kubediscovery project (which is a separate project from CloudARK). We used to main the binaries for MacOS and Linux for kubediscovery. But I haven't been able to test the MacOS binary with the latest version of MacOS. We can exclude this plugin for now. Also, we need to make sure that applogs, appresources, and metrics plugins do not use kubectl connections internally. In the original design we used to do that. We have changed it, but we should verify.

Other plugins (like kubectl retrieve kubeconfig provider) are too specific. Users can get these plugins from this repository.

What is involved in uploading the plugins to the krew repository/index?
Do you know how the plugins are packaged? For each of the above plugins, there are bash files and python files. Do we have to create a tar gz file and upload it to krew repository?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants