diff --git a/src/pages/clusters/actions/cluster.js b/src/pages/clusters/actions/cluster.js index a82012f36f5..0d69dcc85c1 100644 --- a/src/pages/clusters/actions/cluster.js +++ b/src/pages/clusters/actions/cluster.js @@ -53,6 +53,7 @@ export default { const clusters = item.clusters || [] set( formData, + 'spec.placement.clusters', uniqBy([...clusters, { name: cluster.name }], 'name') ) requests.push(workspaceStore.patch(item, formData)) diff --git a/src/pages/clusters/components/Modals/ClusterVisibility/index.jsx b/src/pages/clusters/components/Modals/ClusterVisibility/index.jsx index 8b15898d54b..326861e6715 100644 --- a/src/pages/clusters/components/Modals/ClusterVisibility/index.jsx +++ b/src/pages/clusters/components/Modals/ClusterVisibility/index.jsx @@ -78,7 +78,12 @@ export default class ClusterVisibility extends React.Component { fetchAuthedWorkspaces = params => { const { cluster = {} } = this.props this.authedWorkspaceStore - .fetchList({ ...params, limit: -1, cluster: cluster.name }) + .fetchList({ + ...params, + limit: -1, + cluster: cluster.name, + labelSelector: 'kubefed.io/managed=true', + }) .then(() => { this.setState({ authedWorkspaces: [...toJS(this.authedWorkspaceStore.list.data)], diff --git a/src/pages/clusters/containers/Visibility/index.jsx b/src/pages/clusters/containers/Visibility/index.jsx index 7ac9217da4e..c97ddc1d4ff 100644 --- a/src/pages/clusters/containers/Visibility/index.jsx +++ b/src/pages/clusters/containers/Visibility/index.jsx @@ -63,7 +63,11 @@ export default class Overview extends React.Component { } getData = params => { - this.workspaceStore.fetchList({ ...this.props.match.params, ...params }) + this.workspaceStore.fetchList({ + ...this.props.match.params, + ...params, + labelSelector: 'kubefed.io/managed=true', + }) } afterEdit = async () => {