-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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: support pod exec terminal via websockets #8905
Conversation
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.
This is pretty cool! Thanks for your contribution! Do you have a screenshot of what this looks like?
I have updated the screenshot. It is working in our env and we have been using it for weeks. Still some todos for me:
|
e30ab48
to
12b9d17
Compare
04fe53a
to
9ef15d9
Compare
There are still issues of argo-ui (issue: argoproj/argo-ui#183). When I update latest version of argo-ui and it doesn't pass the front end check https://github.com/argoproj/argo-cd/runs/5732956547?check_suite_focus=true. The reason is that xterm/FitAddon library need to access window object in its implementation. However, the test environment of Argocd is node.js, which has no window object. Here is a stack overflow post discussing the same issue https://stackoverflow.com/questions/66096260/why-am-i-getting-referenceerror-self-is-not-defined-when-i-import-a-client-side. |
@chenyuf4 , @yeya24 I've sent a small PR to your fork with a jest configuration change: yeya24#132 It introduces a |
@alexmt Thanks for your update. I update your change locally, but it still doesn't pass the |
Sorry , looks like this error is intermittent. Working on next PR. |
@chenyuf4 can you please try to apply these changes: alexmt@997fbe7 |
Looks like the tests were successful this time. You can fix some linter errors by running |
Codecov Report
@@ Coverage Diff @@
## master #8905 +/- ##
==========================================
- Coverage 45.63% 45.33% -0.31%
==========================================
Files 217 219 +2
Lines 25696 25870 +174
==========================================
+ Hits 11727 11728 +1
- Misses 12337 12511 +174
+ Partials 1632 1631 -1
Continue to review full report at Codecov.
|
@alexmt Thanks for the help. I think this pr should be ready for review now. All CI checks passed. |
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
206a14a
to
b9f24c5
Compare
@yeya24 will get back to this ASAP. Sorry, been a bit swamped. Definitely want this in 2.4 as well. |
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.
My remaining thoughts:
- It would be nice to have some unit test coverage on terminal.go and websocket.go.
- I think the docs should probably point out that
exec
can be a powerful privilege - for example,exec
grants access to any service account tokens living on accessible pods. Admins should already be aware of that, but it wouldn't hurt to remind them. - I'd love to have a UI expert review. I don't know how to write React decently well, much less securely. :-) Going to request a review from @rbreeze.
I'm really happy with this PR and don't think there's anything that would stop us from merging this before 2.4. But I'd love to get @yeya24 and @alexmt 's thoughts on those points.
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.
Just one nitpick about terminal
package location. Not a blocker to merge. Thank you @yeya24 !
Extremely awesome PR !
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
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.
Adding my approval, will leave unmerged for the moment in case Remington gets a chance to review early this week. If merge without additional tests / security docs, I'll create follow-up issues for those. 🙂
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.
LGTM! Exciting feature!
@yeya24 it seems my attempted merge messed up your beautiful PR. Can you resolve conflicts? Might just want to |
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
@crenshaw-dev I just fixed it and thanks for the update. Are we good to go now? 😄 |
Merging as soon as CI is green! |
feat: support pod exec terminal via websockets (argoproj#8905) Signed-off-by: Ben Ye <ben.ye@bytedance.com> Signed-off-by: wojtekidd <wojtek.cichon@protonmail.com>
Could this |
@jmateusousa it's necessary to update. The feature is significant enough and introduces enough changes to how RBAC works that it wouldn't be a good idea to backport. |
I am running ArgoCD 2.4.2 via the helm chart and seem not be able to enable this feature. I am using the builtin rbac policy and assigned role:admin. |
@sspreitzer you might still need to turn on the |
@crenshaw-dev, as you described, enabling the |
Signed-off-by: Ben Ye ben.ye@bytedance.com
fixes #4351
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist:
Screenshot: