Skip to content
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

[feat] Implement editor agnostic kubeconfig injection #431

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

JPinkney
Copy link
Contributor

@JPinkney JPinkney commented Dec 24, 2021

Signed-off-by: Josh Pinkney [email protected]

What does this PR do?

This PR implements editor agnostic kubeconfig injection for devworkspaces by calling a new endpoint /namespace/:namespace/devworkspaceId/:devworkspaceId/kubeconfig everytime a devworkspace is loaded. This new API injects the kubeconfig into all containers associated with a devworkspaceId.

What issues does this PR fix or reference?

eclipse-che/che#20782

Is it tested? How?

Ensure that Che is running with devworkspaces enabled then either create a new devworkspace from the dashboard itself or use https://gist.githubusercontent.com/JPinkney/d4f6e665d1239a5fc4caefbe20bf4f56/raw/96faebbd51b3bba209f8a8de8b448327f385c779/a.yaml with a factory url (that gist has vscode-kubernetes-tools and vscode-yaml pre-installed). Wait for the workspace to start and then observe that the kubeconfig is located at $HOME/.kube/config. If you are using the gist with vscode-kubernetes-tools then you can also observe that the kubeconfig is automatically loaded into vscode-kubernetes-tools when you open up the side panel.

Release Notes

Docs PR

@JPinkney JPinkney changed the title Implement editor agnostic kubeconfig injection [feat] Implement editor agnostic kubeconfig injection Dec 24, 2021
@JPinkney JPinkney force-pushed the kubeconfig-injection branch from 9c5e4c1 to 141ba19 Compare December 24, 2021 16:33
@JPinkney JPinkney force-pushed the kubeconfig-injection branch from 18c1e0d to 13fc9cb Compare January 4, 2022 21:01
@github-actions
Copy link

github-actions bot commented Jan 4, 2022

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-431

@JPinkney
Copy link
Contributor Author

JPinkney commented Jan 5, 2022

/test v8-dashboard-happy-path

Copy link
Contributor

@olexii4 olexii4 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Jan 5, 2022

Codecov Report

Merging #431 (13fc9cb) into main (1d2a9ad) will decrease coverage by 0.51%.
The diff coverage is 8.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #431      +/-   ##
==========================================
- Coverage   50.80%   50.29%   -0.52%     
==========================================
  Files         216      219       +3     
  Lines        7434     7526      +92     
  Branches     1235     1249      +14     
==========================================
+ Hits         3777     3785       +8     
- Misses       3298     3382      +84     
  Partials      359      359              
Impacted Files Coverage Δ
...ackages/dashboard-backend/src/api/kubeConfigAPI.ts 0.00% <0.00%> (ø)
...ontend/src/store/Workspaces/devWorkspaces/index.ts 8.57% <4.34%> (-0.44%) ⬇️
.../devworkspace-client/services/api/kubeConfigApi.ts 7.14% <7.14%> (ø)
...rvices/dashboard-backend-client/devWorkspaceApi.ts 65.85% <25.00%> (-4.42%) ⬇️
...src/devworkspace-client/services/helpers/stream.ts 28.57% <28.57%> (ø)
...dashboard-backend/src/devworkspace-client/index.ts 40.00% <33.33%> (-0.91%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d2a9ad...13fc9cb. Read the comment docs.

@openshift-ci
Copy link

openshift-ci bot commented Jan 5, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, JPinkney, olexii4

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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.

4 participants