Skip to content

Commit 3837ca0

Browse files
Merge pull request #1808 from openshift-cherrypick-robot/cherry-pick-1805-to-release-0.7
[release-0.7] ddsif: exclude v1beta1 Workspaces
2 parents 55b06a4 + 0767ad7 commit 3837ca0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/informer/informer.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import (
4242
"k8s.io/client-go/tools/cache"
4343
"k8s.io/klog/v2"
4444

45+
"github.com/kcp-dev/kcp/pkg/apis/tenancy"
4546
metadataclient "github.com/kcp-dev/kcp/pkg/metadata"
4647
)
4748

@@ -425,6 +426,15 @@ func (d *DynamicDiscoverySharedInformerFactory) updateInformers() {
425426
group := parts[0]
426427
version := parts[1]
427428
resource := parts[2]
429+
430+
// Don't start a dynamic informer for tenancy.kcp.dev/v1beta1 Workspaces. These are a virtual projection of
431+
// data from tenancy.kcp.dev/v1alpha1 ClusterWorkspaces. Starting an informer for them causes problems when
432+
// the virtual-workspaces server is deployed separately. See https://github.com/kcp-dev/kcp/issues/1654 for
433+
// more details.
434+
if group == tenancy.GroupName && version == "v1beta1" && resource == "workspaces" {
435+
continue
436+
}
437+
428438
latest[gvrFor(group, version, resource)] = struct{}{}
429439
}
430440

0 commit comments

Comments
 (0)