Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
add preKubeadmCommands for flatcar
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-chivu committed Nov 1, 2023
1 parent 0d0e6be commit e48b4ed
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions magnum_capi_helm/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,11 @@ def _update_helm_release(self, context, cluster, nodegroups=None):
"controlPlane": {
"machineFlavor": cluster.master_flavor_id,
"machineCount": cluster.master_count,
"kubeadmConfigSpec": {
"preKubeadmCommands": [
"bash -c \"sed -i 's/{{ local_hostname }}/$(hostname -s)/g' /etc/kubeadm.yml\""
]
}
},
"nodeGroups": [
{
Expand All @@ -835,6 +840,13 @@ def _update_helm_release(self, context, cluster, nodegroups=None):
for ng in nodegroups
if ng.role != NODE_GROUP_ROLE_CONTROLLER
],
"nodeGroupDefaults": {
"kubeadmConfigSpec": {
"preKubeadmCommands": [
"bash -c \"sed -i 's/{{ local_hostname }}/$(hostname -s)/g' /etc/kubeadm.yml\""
]
}
},
"addons": {
"monitoring": {
"enabled": self._get_monitoring_enabled(cluster)
Expand All @@ -853,6 +865,11 @@ def _update_helm_release(self, context, cluster, nodegroups=None):
extra_network_name = self._label(cluster, "extra_network_name", "")
if extra_network_name:
values["nodeGroupDefaults"] = {
"kubeadmConfigSpec": {
"preKubeadmCommands": [
"bash -c \"sed -i 's/{{ local_hostname }}/$(hostname -s)/g' /etc/kubeadm.yml\""
]
},
"machineNetworking": {
"ports": [
{},
Expand Down

0 comments on commit e48b4ed

Please sign in to comment.