Irbe Krumina 10ce099e60 cmd/tailscale/cli: fix configuring partially empty kubeconfig
When a user deletes the last cluster/user/context from their
kubeconfig via 'kubectl delete-[cluster|user|context] command,
kubectx sets the relevant field in kubeconfig to 'null'.
This was breaking our conversion logic that was assuming that the field
is either non-existant or is an array.

Updates tailscale/corp#18320

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
(cherry picked from commit 56f7a09931e5c8d538913ffde570b7d6e0ae753e)
2024-03-21 14:50:50 +01:00
..
2023-08-03 13:00:45 -07:00