Open tnqn opened 1 month ago
This issue is currently awaiting triage.
If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
It looks reasonable. However, I'm wondering whether this was intentional decision due to some reasons. /transfer kubectl
/triage accepted Need to verify that there will not be collision between -f and -F. This will need to get tested across windows/macOS/various linux distros.
This is totally parsed by the program, as opposed to the file path that is usually parsed by the kernel/operating system.
Thank you all for your feedback.
It looks reasonable. However, I'm wondering whether this was intentional decision due to some reasons.
@ardaguclu, I checked https://github.com/kubernetes/kubernetes/pull/50140 which added the flag and didn't find any discussion about the shorthand, I guess it wasn't intentional.
Need to verify that there will not be collision between -f and -F. This will need to get tested across windows/macOS/various linux distros.
@mpuckett159, as @apelisse explains, this is parsed by the program so the flag names are case-sensitive, otherwise the command kubectl get -l <selector> -L <label>
would fail.
I created https://github.com/kubernetes/kubernetes/pull/127345 to implement it, could you please take a look?
/kind feature
Apologies I misunderstood and we need to wait for more evidence for this before accepting. This issue should be fore gathering more feedback. Sorry for the churn/misunderstanding.
What happened?
I’m wondering if the
--field-selector
option is used frequently enough to justify a shorthand like-F
. In our extension API server, we have a field that users need to specify to limit objects within a particular scope, but--field-selector
feels a bit lengthy to type compared to the-l
shorthand for label selectors. Would it make sense to add a shorthand for--field-selector
?Creating the issue to gather some feedback before introducing such a shorthand as suggested by @soltysh.
The original thread in sig-cli slack channel: https://kubernetes.slack.com/archives/C2GL57FJ4/p1725613426106679
cc @soltysh @apelisse
/sig cli
What did you expect to happen?
A shorthand can be used to filter objects by field selector, such as
kubectl get FOO -F .spec.region=BAR
.How can we reproduce it (as minimally and precisely as possible)?
NONE
Anything else we need to know?
No response
Kubernetes version
Cloud provider
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)