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: add the CloudShell feature #4280

Merged
merged 8 commits into from Jul 1, 2022
Merged

Conversation

barnettZQG
Copy link
Collaborator

@barnettZQG barnettZQG commented Jun 29, 2022

Signed-off-by: barnettZQG barnett.zqg@gmail.com

Description of your changes

Provides per-user Cloud Shell in VelaUX where users can execute vela or kubectl commands. Help users to quickly query information and perform advanced operations through Shell style, it includes:

  1. All the capabilities of Vela CLI (within the scope of authority), users can not care about the kubeconfig and permissions.
    Highlights:
    • vela exec
    • vela logs
    • vela status
    • vela up
  2. The ability of kubectl CLI (within the scope of authority);
  3. Call the VelaUX API via cURL;

image

This feature is based on the CloudTTY, Users should enable the addon before using it.

Fixes #4052

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #4280 (ec5d45a) into master (2af8ab1) will increase coverage by 0.07%.
The diff coverage is 51.27%.

@@            Coverage Diff             @@
##           master    #4280      +/-   ##
==========================================
+ Coverage   60.55%   60.62%   +0.07%     
==========================================
  Files         341      343       +2     
  Lines       33181    33669     +488     
==========================================
+ Hits        20092    20413     +321     
- Misses      10464    10573     +109     
- Partials     2625     2683      +58     
Flag Coverage Δ
apiserver-unittests 34.50% <47.26%> (+0.38%) ⬆️
core-unittests 55.28% <0.97%> (-0.19%) ⬇️
e2e-multicluster-test 20.12% <5.68%> (-0.23%) ⬇️
e2e-rollout-tests 22.25% <0.97%> (-0.16%) ⬇️
e2etests 28.78% <0.97%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/apiserver/domain/service/application.go 57.18% <0.00%> (-2.63%) ⬇️
pkg/apiserver/domain/service/image.go 28.31% <0.00%> (-0.52%) ⬇️
pkg/apiserver/domain/service/target.go 60.00% <0.00%> (-4.17%) ⬇️
pkg/apiserver/domain/service/user.go 48.40% <0.00%> (-1.14%) ⬇️
pkg/apiserver/event/sync/cr2ux.go 37.31% <0.00%> (-2.99%) ⬇️
pkg/apiserver/interfaces/api/addon.go 68.75% <ø> (-0.18%) ⬇️
pkg/apiserver/utils/auth.go 47.05% <ø> (ø)
pkg/apiserver/utils/bcode/005_addon.go 0.00% <ø> (ø)
pkg/auth/kubeconfig.go 50.73% <31.42%> (-14.58%) ⬇️
pkg/apiserver/interfaces/api/authentication.go 50.00% <42.85%> (+1.04%) ⬆️
... and 30 more

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 2af8ab1...ec5d45a. Read the comment docs.

@barnettZQG barnettZQG force-pushed the master branch 4 times, most recently from 3f6a9e1 to c90a548 Compare June 29, 2022 11:53
pkg/auth/privileges.go Outdated Show resolved Hide resolved
pkg/auth/kubeconfig.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@Somefive Somefive left a comment

Choose a reason for hiding this comment

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

pkg/auth needs some changes

pkg/auth/kubeconfig.go Outdated Show resolved Hide resolved
@barnettZQG barnettZQG force-pushed the master branch 5 times, most recently from 67c916d to 1df815c Compare July 1, 2022 12:07
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
@yangsoon yangsoon merged commit 2772f03 into kubevela:master Jul 1, 2022
wonderflow added a commit that referenced this pull request Jul 1, 2022
* Feat: add the CloudShell feature

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: handle the error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change the auth package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the CSR name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the generate function

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
@panpan0000
Copy link

Thanks @barnettZQG to adopt https://github.com/cloudtty/cloudtty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add the web shell API
5 participants