Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 865505 - sys-cluster/kubelet /etc/conf.d/kubelete could contain more useful default settings
Summary: sys-cluster/kubelet /etc/conf.d/kubelete could contain more useful default se...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-17 13:56 UTC by ev
Modified: 2024-01-06 16:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
modified /etc/conf.d/kubelet (new_kubelet.initd,952 bytes, text/plain)
2022-09-10 18:42 UTC, ev
Details
new patch for kubelet.initd (kubelet.initd.patch,584 bytes, patch)
2024-01-06 16:47 UTC, ev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ev 2022-08-17 13:56:45 UTC
Openrc kubelete service doesn't work out of the box.

It's config file /etc/conf.d/kubelete is empty by default and kubelet doesn't start without additional config. 

/etc/conf.d/kubelete could be changed to something like this:
```
test -f /var/lib/kubelet/kubeadm-flags.env && source /var/lib/kubelet/kubeadm-flags.env
command_args="$KUBELET_KUBEADM_ARGS --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml --cgroup-driver=cgroupfs --container-runtime-endpoint=unix:///var/run/crio/crio.sock 
```

This config contains cri-o specific path, but rest of the arguments allow for bootsraping of a new node, and starting kubelet on already configured node.
Comment 1 William Hubbs gentoo-dev 2022-08-27 19:53:33 UTC
```/etc/conf.d/*``` files should contain only variable settings, so I
can't use this as is. However, I am open to considering better default
settings if you can suggest them.

Thanks,

William
Comment 2 ev 2022-09-10 18:42:58 UTC
Created attachment 804523 [details]
modified /etc/conf.d/kubelet

This init script adds config flags necessary for kubeadm init and kubeadm join.
Comment 3 ev 2022-09-10 18:46:24 UTC
I've attached modififed init file which moves these variables from /etc/conf.d/kubelet to /etc/init.d/kubelet.

I've tested it with this ebuild:
https://github.com/adippl/evgr/blob/master/sys-cluster/kubelet/kubelet-
Comment 4 ev 2024-01-06 16:47:05 UTC
I've been looking into this issue once again. 

Just adding "--kubeconfig=/etc/kubernetes/kubelet.conf --config=/var/lib/kubelet/config.yaml" to command_args should make kubelet work out of the box.

I'm attaching a minimal patch which modifies /etc/init.d/kubelet. It's simpler than the last one and allows for cluster bootstraping and normal kubelet start.

Please, consider adding it to repo versions of kubelet.
Comment 5 ev 2024-01-06 16:47:51 UTC
Created attachment 881559 [details, diff]
new patch for kubelet.initd