Filter by label should be case-sensitive, otherwise it does not work (-l key) (+ also in alias commands)
Describe the bug The filter by label is case-sensetive and should preserve it's case in history of filters. Currently it's not and I cannot reuse the same filter. Also writing a custom alias to aliases.yaml turns my command to lowercase - that breaks my flow and does not allow to filter what I want to filter.
To Reproduce Steps to reproduce the behavior:
- Type
:Nodecommand - Filter by label
/-l eks.amazonaws.com/nodegroup=MyCluster-node-group-1(this will work fine) - press
Escto clear the filter - Type
/and thenTab(it will be lowercased) - pressEnter- this filter now is not working, because it's lowercased
Also alias like:
my-cluster-node-1: node -l eks.amazonaws.com/nodegroup=MyCluster-node-group-1 won't work, because when I type alias - it's command is also lowercased.
Expected behavior Don't lowercase commands in aliases and filter by labels, because they are case sensitive.
Versions (please complete the following information):
- OS: OSX
- K9s: 0.32.5
- K8s: 1.28
I think, that this fix https://github.com/derailed/k9s/pull/1432 is the cause of such problem currently.
@Yunir I'm pretty sure the line that causes the case-sensitivity in filters is https://github.com/derailed/k9s/blob/v0.32.5/internal/model/history.go#L45
I just finished testing a patch locally before I saw your issue and removing that ToLower line fixed the issue.
https://github.com/derailed/k9s/pull/2888
This issue is stale because it has been open for 30 days with no activity.