Make node-init depend on /bin/sh instead of /bin/bash
Bug report
When using K3S / K3D on Docker for Mac, Node-Init will fail because of cilium's reliance on /bin/bash. The rancher/k3s image (where this is executed) only has a /bin/sh shell, as it is based on Busybox.
Thus I'd recommend to change the node-init script to be /bin/sh compatible :-)
General Information
- Cilium version (run
cilium version): 1.9.1 - Kernel version (run
uname -a) ? - Orchestration system version in use (e.g.
kubectl version, Mesos, ...): Docker for Desktop on K3S/K3D
How to reproduce the issue
See https://sandstorm.de/de/blog/post/running-cilium-in-k3s-and-k3d-lightweight-kubernetes-on-mac-os-for-development.html and https://github.com/cilium/cilium/issues/10516#issuecomment-748519884
All the best, Sebastian
I'll try to get it sorted out!!
Awesome @stafordtituss - thank you so much ❤️
@stafordtituss Did you find time to work on this? Do you need any help or pointers?
@skurfuerst Is it only the init script that needs to be changed? Do you know of other scripts that also need to not be bash-based?
Do you have a link to the script in github?
If I understand correct, this template file needs to be updated accordingly: https://github.com/cilium/cilium/blob/master/install/kubernetes/cilium/templates/cilium-nodeinit-daemonset.yaml
If I understand correct, this template file needs to be updated accordingly: https://github.com/cilium/cilium/blob/master/install/kubernetes/cilium/templates/cilium-nodeinit-daemonset.yaml
I'm not sure that's correct. The issue is the ".sh" script that is run in the container which cilium deploys is a bash script, but the docker containers used by k3d doesn't have bash. The YAML used to do the install should otherwise be fine. (I believe, please let me know if I'm understanding that incorrectly)
AFAICS, this template file is used to build up the cilium node-init docker image, and the relevant shell script is in the STARTUP_SCRIPT section of that template file here -> https://github.com/cilium/cilium/blob/master/install/kubernetes/cilium/templates/cilium-nodeinit-daemonset.yaml#L134. That script should be updated to get rid off bashisms in it. (Please note that I'm not an expert on this, these are just my observations.)
I found we already called /bin/sh in node init daemonset in https://github.com/cilium/cilium/blob/master/install/kubernetes/cilium/templates/cilium-nodeinit/daemonset.yaml#L57. Does this issue still available? @pchaigno @aanm