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 slim image #84

Merged
merged 1 commit into from
Aug 9, 2024
Merged

feat: add slim image #84

merged 1 commit into from
Aug 9, 2024

Conversation

sergelogvinov
Copy link
Contributor

#78

Build two images full size and slim.

ghcr.io/sergelogvinov/kubelet   v1.31.0-rc.1-slim   c925dc6995c0   20 minutes ago   211MB
ghcr.io/sergelogvinov/kubelet   v1.31.0-rc.1        c129faaaf339   21 minutes ago   411MB

What do you think to build two images?

@smira
Copy link
Member

smira commented Aug 7, 2024

Yes, I think reducing kubelet image size is a great step forward.

With Kubernetes removing in-tree CSI drivers, I'm not sure if e.g. ceph-common makes any sense for modern kubelet (i.e. 1.31+).

But your PR might be a good way forward to first introduce -slim images, get them tested and start removing stuff from default images.

Dockerfile Outdated
ca-certificates \
libcap2 \
ethtool \
iproute2 \
Copy link
Member

Choose a reason for hiding this comment

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

socat should be small and seems to be listed as a dependency in upstream kubelet package

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I remember the time when socat was required for kubectl port-forward, i've tested it recently it works without socat.
But we can keep it as well.

I believe, that most of the tools are legacy. And kubernetes community do not want to spent time to removal process yet.

Also my research kubernetes/mount-utils#17

Copy link
Member

Choose a reason for hiding this comment

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

I remember the time when socat was required for kubectl port-forward, i've tested it recently it works without socat.

should we keep it them @smira ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i've added socat to slim version...

Copy link
Member

Choose a reason for hiding this comment

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

What I'm thinking is what if for K8s 1.31+ we offer slim version by default and do a 😱 test?

Copy link
Member

Choose a reason for hiding this comment

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

yeh, and still keep the old one around, so if something breaks it's a machine config patch to fix

Copy link
Member

@smira smira Aug 8, 2024

Choose a reason for hiding this comment

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

so it should be something like:

  • < 1.31 - build "1.x" + "1.x-silim"
  • >= 1.31 - build "1.x" (actually slim) and "1.x-fat" ?

Copy link
Member

Choose a reason for hiding this comment

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

The previous comment was more of a question actually

@smira
Copy link
Member

smira commented Aug 8, 2024

I will refactor this a bit to support what we've discussed so far

@smira
Copy link
Member

smira commented Aug 8, 2024

@frezbo @sergelogvinov please let me know what do you think about the changes I made (in a separate commit)

@sergelogvinov
Copy link
Contributor Author

/lgtm Thanks )

Build two kubelet images full size (fat) and slim.

For Kubernetes < 1.31.0, there will be two images built:

* `v1.x.y` (default, fat)
* `v1.x.y-slim` (slim)

For Kubernetes >= 1.31.0, there will be same two images built, but the
default tag would point to slim image:

* `v1.x.y` (default, slim)
* `v1.x.y-fat` (fat)

Signed-off-by: Serge Logvinov <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
@smira
Copy link
Member

smira commented Aug 9, 2024

/m

@talos-bot talos-bot merged commit 6c43bd1 into siderolabs:main Aug 9, 2024
13 checks passed
smira added a commit to smira/talos that referenced this pull request Aug 9, 2024
@sergelogvinov sergelogvinov deleted the slim branch August 9, 2024 10:16
smira added a commit to smira/talos that referenced this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants