Skip to content

Commit

Permalink
Fix yaml load (#140)
Browse files Browse the repository at this point in the history
* Update admission.py

* Update admission.py
  • Loading branch information
koryaga authored Apr 6, 2022
1 parent 1e7cad0 commit 77a4388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kubemarine/admission.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]))

Expand Down

0 comments on commit 77a4388

Please sign in to comment.