From c9bc344b7a10cc31057fad68de3cdadbdcc96ea0 Mon Sep 17 00:00:00 2001 From: Andrew Bonney Date: Wed, 10 Jan 2024 08:41:18 +0000 Subject: [PATCH] Attempt to fix flatcar - remove duplicate preKubeadmCommands --- magnum_cluster_api/resources.py | 36 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/magnum_cluster_api/resources.py b/magnum_cluster_api/resources.py index 42e0e172..f71fcaef 100644 --- a/magnum_cluster_api/resources.py +++ b/magnum_cluster_api/resources.py @@ -1251,6 +1251,14 @@ def get_object(self) -> objects.ClusterClass: ), }, }, + { + "op": "add", + "path": "/spec/template/spec/kubeadmConfigSpec/preKubeadmCommands", + "value": [ + "systemctl daemon-reload", + "systemctl restart containerd", + ], + }, ], }, { @@ -1279,6 +1287,14 @@ def get_object(self) -> objects.ClusterClass: ), }, }, + { + "op": "add", + "path": "/spec/template/spec/preKubeadmCommands", + "value": [ + "systemctl daemon-reload", + "systemctl restart containerd", + ], + }, ], }, ], @@ -1303,6 +1319,8 @@ def get_object(self) -> objects.ClusterClass: textwrap.dedent( """\ bash -c "sed -i 's/__REPLACE_NODE_NAME__/$(hostname -s)/g' /etc/kubeadm.yml" + systemctl daemon-reload + systemctl restart containerd """ # noqa: E501 ) ], @@ -1368,6 +1386,8 @@ def get_object(self) -> objects.ClusterClass: textwrap.dedent( """\ bash -c "sed -i 's/__REPLACE_NODE_NAME__/$(hostname -s)/g' /etc/kubeadm.yml" + systemctl daemon-reload + systemctl restart containerd """ # noqa: E501 ) ], @@ -1753,14 +1773,6 @@ def get_object(self) -> objects.ClusterClass: ) }, }, - { - "op": "add", - "path": "/spec/template/spec/kubeadmConfigSpec/preKubeadmCommands", - "value": [ - "systemctl daemon-reload", - "systemctl restart containerd", - ], - }, ], }, { @@ -1834,14 +1846,6 @@ def get_object(self) -> objects.ClusterClass: ), }, }, - { - "op": "add", - "path": "/spec/template/spec/preKubeadmCommands", - "value": [ - "systemctl daemon-reload", - "systemctl restart containerd", - ], - }, ], }, ],