kubernetes / release

Release infrastructure for Kubernetes and related components
Apache License 2.0
480 stars 496 forks source link

Fix path for kubelet.env file in kubelet deb package #3625

Closed xmudrii closed 1 month ago

xmudrii commented 1 month ago

What type of PR is this?

/kind bug

What this PR does / why we need it:

We received two reports that our kubelet Debian package installs kubelet.env file in a wrong location:

I was able to confirm these reports. As per some guidelines:

We partially fixed the issue a while ago with #3279, by ensuring that kubeadm is going to read the file from the correct path, but we didn't ensure that we install the file in the correct location. This is now fixed with this PR.

I tried building and installing the package locally to make sure the file is created in the correct location. This change will be applied to all kubelet packages that we build (for all minor releases) once this PR is merged. I don't expect this to regress in any way. 🤞

Does this PR introduce a user-facing change?

`kubelet.env` file is now installed in `/etc/default` instead of `/etc/sysconfig` on Debian-based systems by the `kubelet` package

/assign @saschagrunert @cpanato @puerco cc @kubernetes/release-engineering

xmudrii commented 1 month ago

/priority important-soon

xmudrii commented 1 month ago
$ dpkg -L kubelet | grep /kubelet
/etc/default/kubelet
/lib/systemd/system/kubelet.service
/usr/bin/kubelet
/usr/share/doc/kubelet
/usr/share/doc/kubelet/LICENSE
/usr/share/doc/kubelet/README.md
/var/lib/kubelet
/var/lib/kubelet/.kubelet-keep
xmudrii commented 1 month ago

@saschagrunert Good point, fixed! 😅

k8s-ci-robot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, saschagrunert, xmudrii

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: - ~~[cmd/krel/OWNERS](https://github.com/kubernetes/release/blob/master/cmd/krel/OWNERS)~~ [cpanato,saschagrunert,xmudrii] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment