From c8a61ec98cdb2c880b3d18150fb003d9ec4438c0 Mon Sep 17 00:00:00 2001
From: "Shelming.Song" <Shelming.Song@gmail.com>
Date: Tue, 23 Aug 2022 16:55:24 +0800
Subject: [PATCH] optimize the format of evictionHard in kubelet-config.yaml
 template (#9204)

---
 .../kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2 b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2
index 24468d4d6..9982f62aa 100644
--- a/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2
+++ b/roles/kubernetes/node/templates/kubelet-config.v1beta1.yaml.j2
@@ -104,10 +104,10 @@ systemReserved:
 {% endif %}
 {% if is_kube_master|bool and eviction_hard_control_plane is defined and eviction_hard_control_plane %}
 evictionHard:
-  {{ eviction_hard_control_plane | to_nice_yaml(indent=2) }}
+  {{ eviction_hard_control_plane | to_nice_yaml(indent=2) | indent(2) }}
 {% elif not is_kube_master|bool and eviction_hard is defined and eviction_hard %}
 evictionHard:
-  {{ eviction_hard | to_nice_yaml(indent=2) }}
+  {{ eviction_hard | to_nice_yaml(indent=2) | indent(2) }}
 {% endif %}
 resolvConf: "{{ kube_resolv_conf }}"
 {% if kubelet_config_extra_args %}
-- 
GitLab