diff --git a/src/main/kubeconfig-manager.ts b/src/main/kubeconfig-manager.ts index 320ebce56a..17849c26e0 100644 --- a/src/main/kubeconfig-manager.ts +++ b/src/main/kubeconfig-manager.ts @@ -27,7 +27,7 @@ export class KubeconfigManager { protected createTemporaryKubeconfig(): string { ensureDir(this.configDir) const path = `${this.configDir}/${randomFileName("kubeconfig")}` - let kc = { + const kc = { clusters: [ { name: this.cluster.contextName, diff --git a/src/migrations/cluster-store/3.5.0-beta.1.ts b/src/migrations/cluster-store/3.5.0-beta.1.ts index 984449e8b5..8f2c0dbb8a 100644 --- a/src/migrations/cluster-store/3.5.0-beta.1.ts +++ b/src/migrations/cluster-store/3.5.0-beta.1.ts @@ -11,11 +11,11 @@ export function migration(store: any) { const kubeConfigBase = path.join(app.getPath("userData"), "kubeconfigs") ensureDirSync(kubeConfigBase) - let storedClusters = store.get("clusters") as any[] + const storedClusters = store.get("clusters") as any[] if (!storedClusters) return console.log("num clusters to migrate: ", storedClusters.length) - for (let cluster of storedClusters ) { + for (const cluster of storedClusters ) { // TODO Should probably guard this, not to make the whole migration fail if one cluster fails!? // take the embedded kubeconfig and dump it into a file const kubeConfigFile = clusterStore.writeEmbeddedKubeConfig(cluster.id, cluster.kubeConfig) diff --git a/src/renderer/_vue/components/AddClusterPage.vue b/src/renderer/_vue/components/AddClusterPage.vue index 85c826d40a..c371d3df30 100644 --- a/src/renderer/_vue/components/AddClusterPage.vue +++ b/src/renderer/_vue/components/AddClusterPage.vue @@ -16,8 +16,11 @@ placeholder="Choose a file or drop it here..." drop-placeholder="Drop file here..." @input="reloadKubeContexts()" - > -