gateway-api
gateway-api copied to clipboard
[gwctl] (bug too) kubectl-compliant `get` subcommand with per-resource access
What would you like to be added:
The ability to get a specific resource with gwctl like
gwctl get <RESOURCE_TYPE> <NAME>
or
gwctl get <RESOURCE_TYPE>/<NAME>
Why this is needed:
Currently, it's not possible to get a specific resource via gwctl get RESOURCE_TYPE RESOURCE_NAME
because of a max limit of 1 arg set up with cobra under get.go
Due to this, the resourcediscovery.Filter
's Name attribute becomes unreachable by the user despite it being used under various cases under switch kind
Moreover, the parsing of kind
isn't completely compliant with kubectl convention of kubectl get RESOURCE_TYPE/RESOURCE_NAME
Where kubectl parses the kind as RESOURCE_TYPE and name as RESOURCE_NAME, gwctl blindly parses the kind as RESOURCE_TYPE/RESOURCE_NAME
and name as ""
/assign
Closing as per comments in the PR. Though really appreciate the analysis
/close
@gauravkghildiyal: Closing this issue.
In response to this:
Closing as per comments in the PR. Though really appreciate the analysis
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.