Skip to content

Feat: virtual workspace #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Jul 24, 2025
Merged

Feat: virtual workspace #282

merged 39 commits into from
Jul 24, 2025

Conversation

vertex451
Copy link
Member

@vertex451 vertex451 commented Jul 16, 2025

Solves #275

For more details check docs/virtual-workspaces.md at this PR.

Out of scope

Apiexport-based virtual ws

TBD

  • [ x] Unit/Integration tests
  • [ x] Manual testing of ClusterAccess logic(was affected during the refactoring)

Changes

  • Added virtual workspace support in both Listener and Gateway.
  • Passed auth info to gateway via spec files instead of direct kubeconfig export for all types of clusters.
  • Moved code of metadata injection to a separate package common/auth to eliminate DRY.
  • Altered file watching logic at the gateway to support nesting.
  • Moved file watching logic from the gateway into a separate pacakge common/wather and reused it in the listener(to watch config.yaml for a virtual workspace entries).
  • Adjusted Roundtripper to detect virtual workspace discovery requests.
  • Introduced pattern matching function to extract cluster name from request URL.
  • Took out schema generation code from kcp workspace reconciler to reuse it in virtual workspace reconciler.

Testing

Local setup

Last tested: at 17:00 23.07.2025 at this commit: used constants for timeout
Created an account ✅

Virtual workspace

Last tested: at 17:00 23.07.2025 at this commit: used constants for timeout
Used this config:

virtualWorkspaces:
  - name: custom-ws
    url: https://kcp.api.portal.cc-d1.showroom.apeirora.eu:443/services/contentconfigurations
    kubeconfig: /Users/artem.shcherbatiuk/.kube/cc-clusters/cc-d1-kcp

And successfully fetched ContentConfigurations:
Screenshot 2025-07-22 at 11 08 38

Clusteraccess

Last tested: at 17:00 23.07.2025 at this commit: used constants for timeout
Created clusteraccess entries for both kind-kind(single cluster mode) and kind-target clusters, fetched configMaps for both clusters:
Screenshot 2025-07-23 at 17 18 07

@vertex451 vertex451 self-assigned this Jul 16, 2025
@vertex451 vertex451 added this to the 2025.Q3 milestone Jul 16, 2025
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
@vertex451 vertex451 marked this pull request as ready for review July 22, 2025 09:13
@vertex451 vertex451 requested a review from a team as a code owner July 22, 2025 09:13
Copy link
Member

@aaronschweig aaronschweig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some smaller things to consider

On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
@aaronschweig aaronschweig linked an issue Jul 22, 2025 that may be closed by this pull request
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
vertex451 added 10 commits July 23, 2025 10:15
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
On-behalf-of: @SAP [email protected]
Signed-off-by: Artem Shcherbatiuk <[email protected]>
@vertex451 vertex451 requested review from pteich and aaronschweig July 23, 2025 14:59
Copy link
Member

@aaronschweig aaronschweig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didnt have a new look at it but I want to unblock greg. If we still see some things to work on lets follow up on that

@vertex451 vertex451 merged commit 3c0c16d into main Jul 24, 2025
11 checks passed
@vertex451 vertex451 deleted the feat/virtual-workspace branch July 24, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Custom VirtualWorkspaces in listener and gateway
3 participants