Skip to content

Commit

Permalink
feat: Adding a check which determines if cgroups are enabled on a node (
Browse files Browse the repository at this point in the history
  • Loading branch information
franznemeth authored May 9, 2024
1 parent 5dc12b2 commit ce2642f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions roles/kubernetes/preinstall/tasks/0040-verify-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@
- not ignore_assert_errors
- inventory_hostname in groups['kube_node']

# This command will fail if cgroups are not enabled on the node.
# For reference: https://kubernetes.io/docs/concepts/architecture/cgroups/#check-cgroup-version
- name: Stop if cgroups are not enabled on nodes
command: stat -fc %T /sys/fs/cgroup/
changed_when: false
when: not ignore_assert_errors

# This assertion will fail on the safe side: One can indeed schedule more pods
# on a node than the CIDR-range has space for when additional pods use the host
# network namespace. It is impossible to ascertain the number of such pods at
Expand Down

0 comments on commit ce2642f

Please sign in to comment.