-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 less and e3 to the base image #339
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bart0sh If they are not already assigned, you can assign the PR to them by writing 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 |
/cc @BenTheElder |
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.
text reditors are opinionated.
some use nano, same vim, some emacs.
i don't think we should bundle an editor for that reason.
/retest |
how would recommend this for debugging purposes without any editor available in the image? |
just because they're opinionated it doesn't mean they're not needed. |
sure but i don't know how to use vi, even. |
Hmm what about
Do we really need an editor on the nodes though? Why not edit on the host? What things are you editing? Right now the bar for packages on the node is ~ just "things we need to boot a cluster". I fear the next PR will want emacs /s 😛 |
that's another story. I don't know how to use nano, so we have several choices here:
emacs is out of question due to huge footprint I assume. Let's ask other people. It's better to satisfy part of the users than none in my opinion. |
I hear wanting to debug, but people will probably want different tools for this and I'm not sure we should bundle many if any. My other concern is if we encourage workflows on the "nodes" people will probably start to depend on that for their CI setups too instead of just having Kubernetes. We already had a few pop up in the wild while |
configs mainly. I found it quite awkward and inconvenient to switch between host and container just to edit and copy couple of files. |
I had an impression that Kind is going to be used by developers to debug kubernetes tools. Please, correct me if I'm wrong here. I'm using it exactly for this purpose and I'm very happy about it so far. |
That is indeed the primary purpose, but we've picked up a lot of traction for integrating against Kubernetes (eg testing sonobuoy, cluster API) which seems to be an even stronger niche, so considering that is worthwhile. Details are outlined in the docs under project scope.
Have you seen the ability to add extra mounts? You can bind mount a directory for configs from the host. |
That wouldn't help much if I'd want to edit couple of manifests, systemd drop-ins, some files in /etc etcetera. |
As I'm compiling on the host anyway (I develop on Mac) I don't need anything else. Just an editor. Of course I can install and do install it. Just thought that I'm not the only one who would benefit from having the opportunity to edit files on the node :) |
To be clear this PR overall seems pretty reasonable, I'm just trying to understand your use cases and needs, and I want to avoid opening up to bundling every tool anyone wants for debugging 🙃 Rejecting an emacs PR (if it really is too big) is hard without any line in the sand, and right now the line doesn't encompass this PR. It also might be worth considering if actually we do need plenty of tools for good debug, in which case we can have both a lite and debug base image. My debug workflow doesn't need any of these, I poke at the containers from the host generally, but I'm not sure what the typical kubeadm dev needs 😅 |
With Knowing what tools and uses would help figure out if that makes sense. Maybe we should do a survey. I'd like to bring this up on Monday at our next meeting and see what everyone else thinks. If less and vi suit everyone we can just do this, but if we expect more tools I think something like a debug option for the image might make more sense. With my own workflow this wasn't even on my radar 😅 I agree that others will probably find something like this useful for debugging kubeadm and probably some of the other components too. |
Thank you. I appreciate your attitude.
Don't worry about that :)
Sure, let's discuss it. Of course people would want more tools and I don't see anything bad with this. We just need to come up with a criteria for inclusion/rejection. P.S.: if a footprint is a big concern we can reduce this image. Just a couple of ideas:
|
having ping inside the image will be very useful for troubleshooting network issues too |
Good ideas for reducing it. I completely failed to comment back after the meeting, the suggestion there was to create something like: create FROM kindest/base
RUN apt install vi less ping ... build a base image with: develop kubernetes with node images built like: ... That said, installing a couple of these things in the normal base image is probably reasonable? I'm just not sure where to set the cutoff ... It's very easy to set it at "just what Kubernetes needs" and trim it back at any point based on that. |
+1 IMO we can provide a manual to tell people how to debug, not to force some way.
The above can be used as a guide content. But like the choice of editor or debugging tools, I don't want it to be the focus of our attention, even though I like vi very much. |
I believe it is.
How about setting threshold for a size of the base image and then use 'first come - first served' approach and good old common sense :) ? After all this and similar changes are just PRs and any approver can either approve or reject them. |
/retest |
e3 is a tiny editor and less is a convenient pager. Both are essential for investigation/debugging and configuring work. Additional footprint is just 414 Kb. Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Throwing in my two cents: I don't like the idea of adding tools to the base image - they are not necessary and if we do then it becomes completely arbitrary what to add and what not to. I think the idea to add whatever tools a user may ned on top of the node image is the best solution here. |
/hold |
@neolit123 Feel free to close this PR. no editor - no interest for me to continue with it.
That's what I already do, but it's additional work, which could be eliminated, hence this PR. I agree with @BenTheElder here that it makes sense to have at least some tools in the base image. |
@bart0sh: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I've been meaning to setup a possibly compromise for this, just haven't gotten to it yet... we could put a contrib dockerfile like: ARG BASE_IMAGE=<some default base image version>
FROM ${BASE_IMAGE}
RUN <install editors and other handy debug tools> With build instructions etc., and then when iterating on kubeadm suggest using that as the |
@bart0sh: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
I want to share what I'm doing right now for debugging maybe it can be useful, I'm logging into the image and installing my toolset |
* chore: bump azure provider * bump azure provider version * [CLOUD-109] Integrar GKE como nuevo provider (kubernetes-sigs#320) * Initial gke support * Fix gcr authentication * Minor fixes * Fix gcr authentication * Enable machine pools for gke * Enable gke in capg * Add google artifact registry support * Add gke version validation * Improve error message * Update cluster-operator version * Fix gke install logic * Improve execute command retries (kubernetes-sigs#298) * Improve execute command retries * Fix kubeconfig condition * Fix ecr login when ecr is in another region * Remove comment * [BUILD] 0.17.0-0.3.0: New pre-release * Prepare for next version: 0.17.0-0.3.0-SNAPSHOT * Prepare for next version: 0.17.0-0.3.1-SNAPSHOT * Improve retry logic --------- Co-authored-by: stratiocommit <stratiocommit@stratio.com> * Feature/add infra validations (kubernetes-sigs#335) * version v0.18.0-alpha * update docs for v0.17.0 * fix kind version in readme * comments-update-buildcontext * Added validations for azs, k8sVersion, vpcs and subnets in each provider * fixing dependency bugs * Merge with master * fixed gcp * Update pkg/cluster/internal/validate/gcp.go Co-authored-by: esierra-stratio <102975650+esierra-stratio@users.noreply.github.com> * fixed build * Update CHANGELOG.md --------- Co-authored-by: Benjamin Elder <bentheelder@google.com> Co-authored-by: Daman <aroradaman@gmail.com> Co-authored-by: Kubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com> Co-authored-by: esierra-stratio <102975650+esierra-stratio@users.noreply.github.com> * version v0.18.0-alpha * delete unneeded files * add CHANGELOG --------- Co-authored-by: Francisco Augusto <faugusto@stratio.com> Co-authored-by: stratiocommit <stratiocommit@stratio.com> Co-authored-by: lreciomelero <120394823+lreciomelero@users.noreply.github.com> Co-authored-by: Benjamin Elder <bentheelder@google.com> Co-authored-by: Daman <aroradaman@gmail.com> Co-authored-by: Kubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com>
Both packages are essential for investigation/debugging and
configuring work. Additional footprint is just 414 kb.
I'm using kind for debugging kubeadm on Mac. It works great!
I've noticed that I always end up installing these packages. 'more' is not good to navigate long outputs.
e3 is the smallest possible editor I could find. Despite being very small it supports WordStar, Emacs, Pico, Nedit and VI command syntax.