From e73803c72c191884143dc839789b7ce951699958 Mon Sep 17 00:00:00 2001 From: Samuel Liu Date: Sun, 31 Jul 2022 11:14:27 +0800 Subject: [PATCH] pid reserved must be str (#9124) --- roles/kubernetes/node/defaults/main.yml | 8 ++++---- .../node/templates/kubelet-config.v1beta1.yaml.j2 | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/kubernetes/node/defaults/main.yml b/roles/kubernetes/node/defaults/main.yml index 7a1332bc0..f1657c0e6 100644 --- a/roles/kubernetes/node/defaults/main.yml +++ b/roles/kubernetes/node/defaults/main.yml @@ -26,24 +26,24 @@ kubelet_fail_swap_on: true kube_memory_reserved: 256Mi kube_cpu_reserved: 100m # kube_ephemeral_storage_reserved: 2Gi -# kube_pid_reserved: 1000 +# kube_pid_reserved: "1000" # Reservation for master hosts kube_master_memory_reserved: 512Mi kube_master_cpu_reserved: 200m # kube_master_ephemeral_storage_reserved: 2Gi -# kube_master_pid_reserved: 1000 +# kube_master_pid_reserved: "1000" # Set to true to reserve resources for system daemons system_reserved: false system_memory_reserved: 512Mi system_cpu_reserved: 500m # system_ephemeral_storage_reserved: 2Gi -# system_pid_reserved: 1000 +# system_pid_reserved: "1000" # Reservation for master hosts system_master_memory_reserved: 256Mi system_master_cpu_reserved: 250m # system_master_ephemeral_storage_reserved: 2Gi -# system_master_pid_reserved: 1000 +# system_master_pid_reserved: "1000" ## Eviction Thresholds to avoid system OOMs # https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#eviction-thresholds diff --git a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 index 341f3398a..24468d4d6 100644 --- a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 +++ b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 @@ -68,7 +68,7 @@ kubeReserved: ephemeral-storage: {{ kube_master_ephemeral_storage_reserved }} {% endif %} {% if kube_master_pid_reserved is defined %} - pid: {{ kube_master_pid_reserved }} + pid: "{{ kube_master_pid_reserved }}" {% endif %} {% else %} cpu: {{ kube_cpu_reserved }} @@ -77,7 +77,7 @@ kubeReserved: ephemeral-storage: {{ kube_ephemeral_storage_reserved }} {% endif %} {% if kube_pid_reserved is defined %} - pid: {{ kube_pid_reserved }} + pid: "{{ kube_pid_reserved }}" {% endif %} {% endif %} {% if system_reserved is defined and system_reserved %} @@ -89,7 +89,7 @@ systemReserved: ephemeral-storage: {{ system_master_ephemeral_storage_reserved }} {% endif %} {% if system_master_pid_reserved is defined %} - pid: {{ system_master_pid_reserved }} + pid: "{{ system_master_pid_reserved }}" {% endif %} {% else %} cpu: {{ system_cpu_reserved }} @@ -98,7 +98,7 @@ systemReserved: ephemeral-storage: {{ system_ephemeral_storage_reserved }} {% endif %} {% if system_pid_reserved is defined %} - pid: {{ system_pid_reserved }} + pid: "{{ system_pid_reserved }}" {% endif %} {% endif %} {% endif %}