mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-07 19:26:40 +00:00
Automatic merge from submit-queue (batch tested with PRs 50537, 49699, 50160, 49025, 50205) not allowing "kubectl edit <resource>" when you got an empty list **What this PR does / why we need it**: `kubectl edit` will panic when adding an empty list. > panic: runtime error: index out of range **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50147 **Special notes for your reviewer**: /assign @errordeveloper @mengqiy @janetkuo @fabianofranz /cc @rootfs @soltysh @sttts **Release note**: ```release-note not allowing "kubectl edit <resource>" when you got an empty list ```