Pre-Validate kubeconfig before making available in Lens (#1078)

This commit is contained in:
steve richards authored and Sebastian Malton committed 2021-04-19 11:46:07 -04:00
1 parent 23c9255b9a
commit e560baa2d0
5 files changed
+244 -52

No files matched your search

@@ -62,9 +62,11 @@ export class AddCluster extends React.Component {
this.kubeConfigPath = filePath;
userStore.kubeConfigPath = filePath; // save to store
} catch (err) {
Notifications.error(
<div>Can&apos;t setup <code>{filePath}</code> as kubeconfig: {String(err)}</div>
);
if (!userStore.isDefaultKubeConfigPath) {
Notifications.error(
<div>Can&apos;t setup <code>{filePath}</code> as kubeconfig: {String(err)}</div>
);
}
if (throwError) {
throw err;