Closed survivant closed 4 years ago
+1. We used to (or considered to) have AVAILABLE field on this table.
This looks like a bug. We should be doing this already: https://github.com/kubernetes-sigs/krew/blob/e4b2528eec4df521d8823b4de92d221d6ac26e3d/cmd/krew/cmd/search.go#L84 /kind bug /priority P1 /help
@corneliusweig: This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
If it might help, I've check in my windows server.
Seems like it's working as espected.
PS C:\Windows\System32> kubectl krew search
NAME DESCRIPTION INSTALLED
access-matrix Show an RBAC access matrix for server resources no
advise-psp Suggests PodSecurityPolicies for cluster. unavailable on windows
auth-proxy Authentication proxy to a pod or service no
bulk-action Do bulk actions on Kubernetes resources. unavailable on windows
ca-cert Print the PEM CA certificate of the current clu... unavailable on windows
capture Triggers a Sysdig capture to troubleshoot the r... unavailable on windows
change-ns View or change the current namespace via kubectl. no
cluster-group Exec commands across a group of contexts. unavailable on windows
config-cleanup Automatically clean up your kubeconfig no
cssh SSH into Kubernetes nodes unavailable on windows
ctx Switch between contexts in your kubeconfig unavailable on windows
custom-cols A "kubectl get" replacement with customizable c... unavailable on windows
debug Attach ephemeral debug container to running pod no
debug-shell Create pod with interactive kube-shell. unavailable on windows
deprecations Checks for deprecated objects in a cluster no
df-pv Show disk usage (like unix df) for persistent v... no
doctor Scans your cluster and reports anomalies. no
duck List custom resources with ducktype support no
Well you can change how it detects the OS by changing/adding KREW_OS
environment variable.
https://github.com/kubernetes-sigs/krew/blob/927e4d7a97f2f90fd8439bb8294530d5a1ea5c71/internal/installation/platform.go#L68-L75
Try kubectl krew search -v=2
and check if its printing out the OS/ARCH as you want it to.
And check KREW_OS variable to be sure.
I0316 16:59:46.206573 2664 platform.go:43] Matching platform for labels(arch=amd64,os=windows)
I0316 16:59:46.206573 2664 platform.go:43] Matching platform for labels(arch=amd64,os=windows)
I0316 16:59:46.206573 2664 platform.go:51] Found matching platform with index (2)
I0316 16:59:46.206573 2664 platform.go:43] Matching platform for labels(arch=amd64,os=windows)
I0316 16:59:46.206573 2664 platform.go:43] Matching platform for labels(arch=amd64,os=windows)
I0316 16:59:46.206573 2664 platform.go:43] Matching platform for labels(arch=amd64,os=windows)
I0316 16:59:46.206573 2664 platform.go:43] Matching platform for labels(arch=amd64,os=windows)
OH I get it now! Thanks @onesolpark.
You want a feature to "hide" the ones not available. That's why you did | findstr -V windows
(=grep -v
) in the original post.
I think the decision we have right now is sorta ok.
We might consider some improvement to this, such as perhaps moving the unavailable ones to the end of the list, however right now we have an alphabetical sorting guarantee on the list, it would break that.
@ahmetb
Do you think adding an option to show all plugins (i.e kubectl krew search --show-all
)
and hiding the unsupported plugins as default sound like a viable solution?
I don't think so. For many users this will severely limit their perception of what's available to them (in possibly another machine they own).
got it i guess the best option for now is like you said to move the unavailable ones to the bottom of the list :)
mind if i work on this one?
I think moving the plugins to the end is not the cleanest solution here. I think it makes sense to show everything by default, but we could add an --hide-unavailable
flag enables the filter for the current OS. WDYT?
@onesolpark There is an ongoing effort to add custom indexes which will also touch the krew list
machinery. Just watch out for a PR in that area, to avoid heavy merge conflicts.
@corneliusweig got it i'll watch out for the multi-indexing PR to avoid merge conflicts
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close
@fejta-bot: Closing this issue.
I'm on Windows and it could be great to have a flag to exclude plugin that are not supported in windows.
something that will return the same output as this
kubectl krew search | findstr -V windows