Allow to add the same cluster to multiple workspaces (#961)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2020-09-24 14:30:44 +03:00
1 parent b88c0d4fbf
commit fe4a63a955
3 files changed
+22 -5

No files matched your search

@@ -99,7 +99,7 @@ export class AddCluster extends React.Component {
getContexts(config: KubeConfig): Map<string, KubeConfig> {
const contexts = new Map();
splitConfig(config).forEach(config => {
const isExists = clusterStore.hasContext(config.currentContext);
const isExists = clusterStore.hasContextInWorkspace(config.currentContext, workspaceStore.currentWorkspaceId);
if (!isExists) {
contexts.set(config.currentContext, config);
}