fix: include APIResource name in the aliases (#3274)

- fix: https://github.com/derailed/k9s/issues/3273
mine
Sunggun Yu 2025-04-13 11:08:10 -04:00 committed by GitHub
parent df32d10d6b
commit 630f82cacd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ import (
func aliases(m *v1.APIResource, aa sets.Set[string]) sets.Set[string] { func aliases(m *v1.APIResource, aa sets.Set[string]) sets.Set[string] {
ss := sets.New(aa.UnsortedList()...) ss := sets.New(aa.UnsortedList()...)
ss.Insert(m.Name)
ss.Insert(m.ShortNames...) ss.Insert(m.ShortNames...)
if m.SingularName != "" { if m.SingularName != "" {
ss.Insert(m.SingularName) ss.Insert(m.SingularName)