-
Notifications
You must be signed in to change notification settings - Fork 346
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
Add "antctl proxy" support #1452
Conversation
Thanks for your PR. The following commands are available:
|
Codecov Report
@@ Coverage Diff @@
## master #1452 +/- ##
==========================================
+ Coverage 67.85% 67.86% +0.01%
==========================================
Files 159 159
Lines 12829 12830 +1
==========================================
+ Hits 8705 8707 +2
- Misses 3203 3204 +1
+ Partials 921 919 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
ad1331c
to
023ea20
Compare
antctl binary size increased by about 2% (50MB -> 51MB) with some small variations based on the platform |
@@ -384,3 +386,32 @@ results: | |||
componentInfo: Output | |||
action: Delivered | |||
``` | |||
|
|||
### Antctl Proxy |
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.
Would you mention antctl will get the controller/agent Node IP from K8s API, and connects to that IP?
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.
Good idea, updated that section
5809c83
to
ec4a75c
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.
LGTM. Thanks for the work, I believe it will be very useful when debugging APIs under development as well. Previously I have to use a script to get the token and construct the API request manually.
With this command antctl can operate as a reverse proxy for Antrea APIs, similarly to "kubectl proxy" for the K8s APIs (we rely on the k8s.io/kubectl Go module for the implementation). Thanks to this, troubleshooting the APIs can become much easier and we hide complexity from clients. One example is that it becomes much easier to use "go tool pprof". The drawback here is that the HTTPS connection between the proxy and the Antrea Agent / Controller is not secure (this can be fixed for the Controller at least); in this it is very similar to the supportbundle command implementation. Fixes antrea-io#1434
ec4a75c
to
276bd0e
Compare
/test-all |
/test-all |
With this command antctl can operate as a reverse proxy for Antrea APIs,
similarly to "kubectl proxy" for the K8s APIs (we rely on the
k8s.io/kubectl Go module for the implementation). Thanks to this,
troubleshooting the APIs can become much easier and we hide complexity
from clients. One example is that it becomes much easier to use "go tool
pprof". The drawback here is that the HTTPS connection between the proxy
and the Antrea Agent / Controller is not secure (this can be fixed for
the Controller at least); in this it is very similar to the
supportbundle command implementation.
Fixes #1434