Correctly migrate duplicate clusters in workspaces (#3211)

- Keep track of the set of all workspaces that each duplicated entry was
  a part of

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-07-02 14:21:04 +03:00
1 parent b00afee15c
commit 05311c4b1b
4 files changed
+38 -11

No files matched your search

+9
View File
@@ -120,6 +120,10 @@ export class Cluster implements ClusterModel, ClusterState {
* @deprecated
*/
@observable workspace: string;
/**
* @deprecated
*/
@observable workspaces: string[];
/**
* Kubernetes API server URL
*
@@ -294,6 +298,10 @@ export class Cluster implements ClusterModel, ClusterState {
this.workspace = model.workspace;
}
if (model.workspaces) {
this.workspaces = model.workspaces;
}
if (model.contextName) {
this.contextName = model.contextName;
}
@@ -589,6 +597,7 @@ export class Cluster implements ClusterModel, ClusterState {
contextName: this.contextName,
kubeConfigPath: this.kubeConfigPath,
workspace: this.workspace,
workspaces: this.workspaces,
preferences: this.preferences,
metadata: this.metadata,
accessibleNamespaces: this.accessibleNamespaces,