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
Switch core master base images (kube-apiserver, kube-scheduler) from debian to distroless #90674
Conversation
cab5dc8
to
c84d6a3
Compare
9555b54
to
984e089
Compare
/test pull-kubernetes-conformance-kind-ga-only-parallel |
/test pull-kubernetes-e2e-kind-ipv6 |
/priority important-soon |
/kind feature |
/assign @tallclair @yuwenma @wojtek-t @mm4tt |
I remember this now. The controller manager runs flexvolume plugins, and flexvolume plugins include our e2e plugins may be shell scripts. You can't rip out the userspace from controller manager without breaking flexvolume. |
/approve cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, fejta, justaugustus 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 |
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-storage/flexvolume.md init, attach, detach, wait for attach, checking if attached are all called from the controller manager, which is done via an exec model. While the binary called comes from a path on the host, it is invoked in the controller-manager container filesystem (or kubelet). Currently they can reasonably expect a generic linux userspace ... debian specifically for controller manager. |
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.
@BenTheElder -- would I be correct in the assumption that removing the controller-manager changes should get us back in a good state?
If so, @dims, I've made a few code suggestions on what to revert.
EDIT: @dims -- In places where we can't/shouldn't use go-runner
e.g., kube-controller-manager
, kube-proxy
, can you add a note referencing the base image exception list?
As far as I know controller-manager / flexvolume is the only thing like this, reverting it should be sufficient but unfortunate, we'll still be stuck shipping these images ... I had some conversations with @yuwenma and the GKE node team about this in the past when we were trying to figure out @yuwenma's attempt at this. IIRC per @msau42 the idea was that eventually flexvolume could be deprecated out, but probably not until CSI was further along, or something along those lines ... |
Okay, that was what I was getting from skimming through some of the docs/issues. |
/retest |
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
c459a39
to
1aa67fc
Compare
/hold cancel @justaugustus @BenTheElder removed controller-manager from this PR. Let's deal with that later. |
@dims -- Can you address this as well? I want to make sure we deter changes to the images and provide context about why. |
@justaugustus not yet. i want this to merge and i am looking at options for controller-manager, looking at logs now. |
/lgtm |
Kudos to @yuwenma for all the earlier work on this that made this PR possible!
Premise : Since the PR for switching on
--log-file
in the manifests ran into trouble and got reverted a few times, trying another approach here. The key idea here is that we need to1>>/var/log/kube-apiserver.log 2>&1
So we basically need a go based runner which redirects stdout/stderr. See go-runner.go. Then we need to wrap this go-runner in a distroless image which we can then use in both the bazel and make based builds. So that's what we ended up in this PR.
Signed-off-by: Davanum Srinivas davanum@gmail.com
What type of PR is this?
/kind feature
What this PR does / why we need it:
Please see the image repo https://github.com/dims/go-runner, happy to add that repo to k/k or elsewhere once we validate this approach works
Which issue(s) this PR fixes:
Related to KEP https://github.com/kubernetes/enhancements/tree/master/keps/sig-release/1729-rebase-images-to-distroless
Special notes for your reviewer:
Borrowed code from previous experiments by @yuwenma from #75306 and #83390
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: