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

kubectl view-utilization broken #54

Open
JJJJJones opened this issue Apr 2, 2020 · 2 comments
Open

kubectl view-utilization broken #54

JJJJJones opened this issue Apr 2, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@JJJJJones
Copy link

JJJJJones commented Apr 2, 2020

Describe the bug
Kubectl plugin naming conventions dictates that anything hyphen-separated is a subcommand so kubectl-view-utilization should be called like kubectl view utilization and not kubectl view-utilization.

sh-4.2# kubectl plugin list
The following compatible plugins are available:

/usr/local/bin/kubectl-grep
/usr/local/bin/kubectl-ingress_nginx
/usr/local/bin/kubectl-view-utilization
sh-4.2# kubectl-view-utilization -v
v0.3.2
sh-4.2# kubectl view utilization
The connection to the server localhost:8080 was refused - did you specify the right host or port?
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Resource  Requests  %Requests  Limits  %Limits  Allocatable  Schedulable  Free
CPU                       Err              Err                         0     0
Memory           0        Err              Err            0            0     0
sh-4.2# kubectl view-utilization
Error: unknown command "view-utilization" for "kubectl"
Run 'kubectl --help' for usage.
sh-4.2#

System details

  • Operating system that client is running
    MacOS 10.15.3, CentOS7/8, Docker 2.2.0.4
  • kubectl client and server version kubectl version
    1.16.6
  • view-utilization plugin version kubectl view-utilization -v
    kubectl view-utilization -v is precisely what doesn't work :) but its v0.3.2
@JJJJJones JJJJJones added the bug Something isn't working label Apr 2, 2020
@etopeter
Copy link
Owner

etopeter commented Apr 2, 2020

@JJJJJones thank you for submitting issue. Can you please share how did you install this plugin?
There are 3 ways to install this plugin described in Readme.md

  1. Krew plugin manager
  2. Curl download
  3. Brew package manager

Instructions in Readme.md call to move file view-utilization to kubectl-view_utilization if you use curl method.

Brew method is doing it for you: https://github.com/etopeter/homebrew-tap/blob/master/kubectl-view-utilization.rb#L11

Name also adheers to krew plugin naming convention where they require to use - between words (https://krew.sigs.k8s.io/docs/developer-guide/develop/naming-guide/) . It does convert kubectl-view-utilization to kubectl-view_utilization during installation process. The actual name of this plugin was inspired by krew plugin maintainer as it was called only utilization when I first submitted it to krew-index. There are other plugins with view prefix and that's why I added view-utilization to the name.

@JJJJJones
Copy link
Author

Ah, i'm using the cURL method is why! I'll automate the rename.

Why not just have it as kubectl-view_utilization always?

Name also adheers to krew plugin naming convention where they require to use - between words (https://krew.sigs.k8s.io/docs/developer-guide/develop/naming-guide/).

While the rest of the conventions are okayish, using a hyphen always is an inflexible naming scheme that doesn't work the best when kubectl-view_utilization isn't a subcommand of kubectl view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants