From 1533d4041126625d69f2d35f10ce28083941686f Mon Sep 17 00:00:00 2001
From: Max Gautier <mg@max.gautier.name>
Date: Wed, 4 Sep 2024 14:02:53 +0200
Subject: [PATCH] Fix kube_reserved_cgroups_for_service_slice

The default value is used across kubespray but only defined in
kubernetes/node.
Move it to kubespray-defaults
---
 roles/kubernetes/node/defaults/main.yml         | 1 -
 roles/kubespray-defaults/defaults/main/main.yml | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/roles/kubernetes/node/defaults/main.yml b/roles/kubernetes/node/defaults/main.yml
index 4d4b011a7..bb374f04a 100644
--- a/roles/kubernetes/node/defaults/main.yml
+++ b/roles/kubernetes/node/defaults/main.yml
@@ -36,7 +36,6 @@ kubelet_secure_addresses: "localhost link-local {{ kube_pods_subnet }} {{ kube_n
 # Reserve this space for kube resources
 # Whether to run kubelet and container-engine daemons in a dedicated cgroup. (Not required for resource reservations).
 kube_reserved: false
-kube_reserved_cgroups_for_service_slice: kube.slice
 kube_reserved_cgroups: "/{{ kube_reserved_cgroups_for_service_slice }}"
 kube_memory_reserved: 256Mi
 kube_cpu_reserved: 100m
diff --git a/roles/kubespray-defaults/defaults/main/main.yml b/roles/kubespray-defaults/defaults/main/main.yml
index e2d0ec22e..70d6b1647 100644
--- a/roles/kubespray-defaults/defaults/main/main.yml
+++ b/roles/kubespray-defaults/defaults/main/main.yml
@@ -29,6 +29,9 @@ kube_proxy_mode: ipvs
 ## The timeout for init first control-plane
 kubeadm_init_timeout: 300s
 
+# TODO: remove this
+kube_reserved_cgroups_for_service_slice: kube.slice
+
 ## List of kubeadm init phases that should be skipped during control plane setup
 ## By default 'addon/coredns' is skipped
 ## 'addon/kube-proxy' gets skipped for some network plugins
-- 
GitLab