Skip to content
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

Change a task name in preinstall tasks (in 0080-system-configurations.yml ) #11170

Closed
kimsehwan96 opened this issue May 7, 2024 · 0 comments · Fixed by #11171
Closed

Change a task name in preinstall tasks (in 0080-system-configurations.yml ) #11170

kimsehwan96 opened this issue May 7, 2024 · 0 comments · Fixed by #11171
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@kimsehwan96
Copy link
Contributor

What would you like to be added

I think that change the task name Ensure kube-bench parameters are set in kubernetes/preinstall/tasks/0080-system-configurations.yml into Ensure kubelet expected parameters are set

- name: Ensure kube-bench parameters are set
ansible.posix.sysctl:
sysctl_file: "{{ sysctl_file_path }}"
name: "{{ item.name }}"
value: "{{ item.value }}"
state: present
reload: yes
with_items:
- { name: kernel.keys.root_maxbytes, value: 25000000 }
- { name: kernel.keys.root_maxkeys, value: 1000000 }
- { name: kernel.panic, value: 10 }
- { name: kernel.panic_on_oops, value: 1 }
- { name: vm.overcommit_memory, value: 1 }
- { name: vm.panic_on_oom, value: 0 }
when: kubelet_protect_kernel_defaults | bool

Because those kernel parameters' values are expected for kubelet to be set before kubelet service start (if --protect-kernel-default=false then kubelet will set those parameters).

https://github.com/kubernetes/kubernetes/blob/1dc30bf90fd6a729d226b4e942118110b0a73e65/pkg/kubelet/cm/container_manager_linux.go#L400-L446

https://github.com/kubernetes/kubernetes/blob/1dc30bf90fd6a729d226b4e942118110b0a73e65/staging/src/k8s.io/component-helpers/node/util/sysctl/sysctl.go#L26-L65

As you can see above kubelet related codes, kubelet will validate and set (if needed) the kernel parameters.

Why is this needed

These kernel parameters are the expected values for kubelet to operate, so it would be good to change the task name for a clearer understanding of its operation.

@kimsehwan96 kimsehwan96 added the kind/feature Categorizes issue or PR as related to a new feature. label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant