From 77a4388a64e0ab1977e7bfc18654f319ffd22700 Mon Sep 17 00:00:00 2001 From: koryaga <5212888+koryaga@users.noreply.github.com> Date: Wed, 6 Apr 2022 16:06:19 +0300 Subject: [PATCH] Fix yaml load (#140) * Update admission.py * Update admission.py --- kubemarine/admission.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubemarine/admission.py b/kubemarine/admission.py index 26ea2af55..0e2acc325 100644 --- a/kubemarine/admission.py +++ b/kubemarine/admission.py @@ -370,7 +370,7 @@ def restart_pods_task(cluster, disable_eviction=False): first_master.sudo("kubectl uncordon %s" % node["name"], hide=False) cluster.log.debug("Restarting daemon-sets...") - daemon_sets = yaml.load(list(first_master.sudo("kubectl get ds -A -o yaml").values())[0].stdout) + daemon_sets = ruamel.yaml.YAML().load(list(first_master.sudo("kubectl get ds -A -o yaml").values())[0].stdout) for ds in daemon_sets["items"]: first_master.sudo("kubectl rollout restart ds %s -n %s" % (ds["metadata"]["name"], ds["metadata"]["namespace"]))