mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 07:03:28 +00:00
When retrieving the cluster-info CM, ensure the cluster pointed out by the current context in the kubeconfig is validated. Add unit test for the above. Make the function GetClusterFromKubeConfig() to return various errors. Handle the errors on call sites. Add unit tests for the update. The above changes prevent panics when the users has manually edited and malformed the kubeconfig in the cluster-info CM.