-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Improve kubectl plugin #3870
Improve kubectl plugin #3870
Conversation
Yes, please use kubectl and remove the client-go code. This not only removes code from this repo but is consistent with the kubectl binary the user is already using. |
@aledbf, @ElvinEfendi I think this PR is about ready feature-wise. Let me know if you have any concerns or any more features you want me to add. |
5e9e9b5
to
9d62ec9
Compare
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, alexkursell, ElvinEfendi 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 |
Based on feedback in #3831, I've made the following additions to the plugin
--service
and--deployment
flags where appropriate for situations in which the ingress-nginx service or deployment names are not the defaults.logs
command to display the logs of an ingress-nginx controllerexec
command to execute a command inside the controllerssh
command to get a shell inside the controller.ENDPOINTS
column toingresses
to show the number of endpoints for the backend service (orN/A
if it's an ExternalName). This count currently ignores some of the subtleties of endpoints where not every endpoint in a service is actually serving the particular port the ingress is using, but it's good enough for a rough count.To get this merged, I feel like there are a few things left to consider:
exec
andssh
(andlogs
too, with all of the flags it should support) might require duplicating uncomfortably large parts ofkubectl
functionality. It might be better to have those commands "fall-through" and just call kubectl directly behind the scenes with the correct pod name. I don't think this plugin will ever be used in a context wherekubectl
doesn't exist, but this warrants some discussion. edit exec, ssh, and logs have been replaced with kubectl fall-throughkubectl logs
flags tologs
main.go
in particular is getting uncomfortably large and should probably be broken up into multiple filesSome things that should probably get done before the
0.24.0
release, but maybe not necessarily in this PR: