For file discovery, in case the user feeds a file for the CA from the kubeconfig, make sure it's preloaded and embedded using the new function EnsureCertificateAuthorityIsEmbedded(). This commit also applies cleanup: - unroll validateKubeConfig() into ValidateConfigInfo() as this way the default cluster can be re-used. - in ValidateConfigInfo() reuse the variable config instead of creating a new variable kubeconfig. - make the Ensure* functions return descriptive errors instead of wrapping the errors on the side of the callers.
6.7 KiB
6.7 KiB