File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -100,9 +100,16 @@ func apiNames(a metav1.APIResource, gv schema.GroupVersion) []string {
100100 // TODO(ahmetb): sometimes SingularName is empty (e.g. Deployment), use lowercase Kind as fallback - investigate why
101101 singularName = strings .ToLower (a .Kind )
102102 }
103+ names := []string {singularName }
104+
103105 pluralName := a .Name
106+ if singularName != pluralName {
107+ names = append (names , pluralName )
108+ }
109+
104110 shortNames := a .ShortNames
105- names := append ([]string {singularName , pluralName }, shortNames ... )
111+ names = append (names , shortNames ... )
112+
106113 for _ , n := range names {
107114 fmtBare := n // e.g. deployment
108115 fmtWithGroup := strings .Join ([]string {n , gv .Group }, "." ) // e.g. deployment.apps
You can’t perform that action at this time.
0 commit comments