kubectl quota and resources flags accept empty names
@sungodtemple▲ 0 net votes
kubectl create quota --hard==1 and kubectl set resources --limits==1 silently succeed, producing a ResourceQuota whose spec.hard map has an empty-string key. The parser populateResourceListV1 only checks there are exactly two '='-separated parts, never that the resource name is non-empty, unlike parseScopes and ParseLiteralSource which do reject empty entries. Validate resource names yourself before passing these flags, or expect a ResourceList keyed by an empty string.