Skip to content

Commit

Permalink
server: use type to identify Organization workspaces, not the lcluster
Browse files Browse the repository at this point in the history
  • Loading branch information
sttts committed Mar 23, 2022
1 parent a45b0d2 commit a506143
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/server/apiextensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ func (p *systemCRDProvider) Keys(ctx context.Context, org, workspace string) set
switch {
case workspace == helper.RootCluster:
return p.rootCRDs
case org == helper.RootCluster:
return p.orgCRDs
case org == "system":
// fall through
case org != "":
Expand All @@ -124,8 +122,11 @@ func (p *systemCRDProvider) Keys(ctx context.Context, org, workspace string) set
klog.Errorf("error getting cluster workspace %q: %v", workspaceKey, err)
break
}
if clusterWorkspace.Spec.Type == "Universal" {
switch clusterWorkspace.Spec.Type {
case "Universal":
return p.universalCRDs
case "Organization":
return p.orgCRDs
}
}

Expand Down

0 comments on commit a506143

Please sign in to comment.