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

This commit is contained in:
steve richards authored and GitHub committed 2021-04-16 11:41:18 -04:00
1 parent 5b162df062
commit 96258c369f
5 files changed
+246 -54

No files matched your search

@@ -63,9 +63,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;