Skip to content

Commit

Permalink
List global repos from main cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
  • Loading branch information
Rafa Castelblanque committed Oct 17, 2022
1 parent 404c7cf commit 29118bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dashboard/src/actions/repos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export const fetchRepoSummaries = (
return async (dispatch, getState) => {
const {
clusters: { currentCluster },
config: { helmGlobalNamespace, carvelGlobalNamespace },
config: { kubeappsCluster, helmGlobalNamespace, carvelGlobalNamespace },
} = getState();
try {
dispatch(requestRepoSummaries(namespace));
const repos = await PackageRepositoriesService.getPackageRepositorySummaries({
cluster: currentCluster,
cluster: namespace ? currentCluster : kubeappsCluster,
namespace: namespace,
});
if (!listGlobal || [helmGlobalNamespace, carvelGlobalNamespace].includes(namespace)) {
Expand All @@ -85,8 +85,9 @@ export const fetchRepoSummaries = (
// however, this can cause issues when using unprivileged users, see #5215
let totalRepos = repos.packageRepositorySummaries;
dispatch(requestRepoSummaries(""));
// Global repos are only related to the Kubeapps cluster
const globalRepos = await PackageRepositoriesService.getPackageRepositorySummaries({
cluster: currentCluster,
cluster: kubeappsCluster,
namespace: "",
});
// Avoid adding duplicated repos: if two repos have the same uid, filter out
Expand Down

0 comments on commit 29118bb

Please sign in to comment.