-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Incorrect list splitting in kubelet config template #9693
Labels
kind/bug
Categorizes issue or PR as related to a bug.
Comments
Tristan971
added a commit
to Tristan971/kubespray
that referenced
this issue
Jan 20, 2023
k8s-ci-robot
pushed a commit
that referenced
this issue
Jan 24, 2023
Tristan971
added a commit
to Tristan971/kubespray
that referenced
this issue
Jan 24, 2023
k8s-ci-robot
pushed a commit
that referenced
this issue
Jan 25, 2023
enneitex
pushed a commit
to enneitex/kubespray
that referenced
this issue
Jan 25, 2023
HoKim98
pushed a commit
to ulagbulag/kubespray
that referenced
this issue
Mar 8, 2023
nolimitkun
pushed a commit
to nolimitkun/kubespray
that referenced
this issue
Mar 19, 2023
pedro-peter
pushed a commit
to pedro-peter/kubespray
that referenced
this issue
May 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment:
Cloud provider or hardware configuration: Controller issue, irrelevant
OS (
printf "$(uname -srm)\n$(cat /etc/os-release)\n"
): Controller issue, irrelevantVersion of Ansible (
ansible --version
):python --version
):Kubespray version (commit) (
git rev-parse --short HEAD
):c4346e5
Network plugin used: Cilium but irrelevant
Full inventory with variables (
ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"
):Relevant line is:
based on
kubespray/docs/cgroups.md
Lines 10 to 13 in c4346e5
Command used to invoke ansible:
Irrelevant, but upgrade-cluster playbook
Output of ansible run:
The run goes fine, until we hit the first Kubelet restart and see the following in its logs:
And indeed:
Anything else do we need to know:
A call to jinja's
split()
function is made in the kubelet config template here:kubespray/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2
Lines 18 to 24 in 1c4db61
This however doesn't work by default for comma-separated lists, which thus contradicts the inventory examples and documentation
See the following example matching Kubespray's current behaviour:
And what was intended (
split(',')
):Small note: I also find the extra quote escaping on the
if != ""
just above quite suspicious. Didn't test it though, and it might work somewhat by chance, but still seems kind of wrong.The text was updated successfully, but these errors were encountered: