-
Notifications
You must be signed in to change notification settings - Fork 394
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
✨ Support for pod logs and other subresources #2401
✨ Support for pod logs and other subresources #2401
Conversation
Skipping CI for Draft Pull Request. |
c1e8141
to
cf5750c
Compare
bd42b0a
to
421718a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have unit tests ?
b431132
to
43fe979
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move your handler in a dedicated file ? (like for the Home workspaces handler)
43fe979
to
1fa746d
Compare
/retitle ✨ Support for pod logs and other subresources |
c4bc28d
to
3c1265c
Compare
14073bb
to
7199a2e
Compare
/retest |
6ec7aaa
to
708c5e8
Compare
708c5e8
to
4c4e687
Compare
/lgtm |
@sttts Would you give a last look and approve ? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
known flake kcp-dev/contrib-tmc#77, retrying /retest |
/retest |
Summary
Adds support to kcp for POD subresources, adding the proper handler to use the Syncer Tunneler capabilities.
The Feature gate
KCPSyncerTunnel
should be enabled in KCP and all the desired Syncers:There are still some missing parts to make this process "fully" automatic:
ClusterRole
.Steps to test this PR
Build the project and images:
Run KCP:
Create your workspace:
Create your Synctarget, using the syncer imatge from the first step:
Now we need to modify the
syncer.yaml
file to add the missingClusterRole
permissions:Deploy the syncer to out k8s cluster:
Let's bind the compute:
We should create a deployment now:
Now the tricky part, we need to create a POD in KCP with the same name as the downstream one trough the Upsyncer.
Get the upsyncer URL:
The URL should look like:
https://172.22.10.60:6443/services/upsyncer/root:testing:testing/cluster1/ad76b43c-399b-40d7-b499-32a568e6861c
Get the synctarget key:
Now we need the downstream POD name:
Now that we have the Upsyncer VW URL, the Synctarget Key and the POD name we can upsync a "fake" POD (this will likely be done in the future by the upsyncer controller), please replace the :
If everything went Ok, you should be able to retrieve the POD in KCP:
Now you should be able to get the pods logs or exec a command:
Related issue(s)
Fixes ##1976