Repository: kubermatic/machine-controller
Pull request #1478 (2022-11-08 15:33:34)

Refactor overwriteCloudConfigSpec for MDs 
**What this PR does / why we need it**:
Machine deployment for vSphere, contains the credentials for vcenter, written explicitly. This pr removes that overwriteCloudSpec field and rely only on the OSM configs

**Which issue(s) this PR fixes**:
<!--optional, in `fixes #<issue number>` format, will close the issue(s) when PR gets merged-->
Fixes #https://github.com/kubermatic/kubermatic/issues/4974

**What type of PR is this?**
/kind bug
<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind design

Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
/kind chore
-->

**Special notes for your reviewer**:

**Does this PR introduce a user-facing change? Then add your Release Note here**:
<!--
Write your release note:
1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "action required".
2. If no release note is required, just write "NONE".
-->
```release-note
Remove the overwriteCloudSpec field from vSphere Machine Deployment 
```

**Documentation**:
<!--
Please do one of the following options:
- Add a link to the existing documentation
- Add a link to the kubermatic/docs pull request
- If no documentation change is applicable then add:
  - TBD (documentation will be added later)
  - NONE (no documentation needed for this PR)
-->
```documentation
None
```


kubermatic-bot: LGTM label has been added.  <details>Git tree hash: 8a35b463434d12eac34457123299d9a298a21580</details>
kubermatic-bot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubermatic/machine-controller/pull/1478#" title="Author self-approved">moadqassem</a>*, *<a href="https://github.com/kubermatic/machine-controller/pull/1478#pullrequestreview-1172373491" title="Approved">xmudrii</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubermatic%2Fmachine-controller).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubermatic/machine-controller/blob/main/OWNERS)~~ [moadqassem,xmudrii]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
kubermatic-bot: @moadqassem: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-machine-controller-e2e-custom-ca | 449eeade706ed14bc1f6d0b16c3e6e589dd1e5ec | [link](https://public-prow.loodse.com/view/gs/prow-dev-public-data/pr-logs/pull/kubermatic_machine-controller/1478/pull-machine-controller-e2e-custom-ca/1590004633923751936) | true | `/test pull-machine-controller-e2e-custom-ca`

[Full PR test history](https://public-prow.loodse.com/pr-history?org=kubermatic&repo=machine-controller&pr=1478)

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
kubermatic-bot: New changes are detected. LGTM label has been removed.
kubermatic-bot: LGTM label has been added.  <details>Git tree hash: 73029329ca60a1e464a74b62efdf1affea0e6002</details>
kubermatic-bot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubermatic/machine-controller/pull/1478#" title="Author self-approved">moadqassem</a>*, *<a href="https://github.com/kubermatic/machine-controller/pull/1478#pullrequestreview-1172543128" title="Approved">xmudrii</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubermatic%2Fmachine-controller).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubermatic/machine-controller/blob/main/OWNERS)~~ [moadqassem,xmudrii]
- ~~[pkg/userdata/OWNERS](https://github.com/kubermatic/machine-controller/blob/main/pkg/userdata/OWNERS)~~ [moadqassem]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/pkg/controller/machine/machine_controller.go b/pkg/controller/machine/machine_controller.go
index 5c183c6b..73447967 100644
--- a/pkg/controller/machine/machine_controller.go
+++ b/pkg/controller/machine/machine_controller.go
@@ -756,11 +756,6 @@ func (r *Reconciler) ensureInstanceExistsForMachine(
 				}
 			}
 
-			cloudConfig, kubeletCloudProviderName, err := prov.GetCloudConfig(machine.Spec)
-			if err != nil {
-				return nil, fmt.Errorf("failed to render cloud config: %w", err)
-			}
-
 			// grab kubelet featureGates from the annotations
 			kubeletFeatureGates := common.GetKubeletFeatureGates(machine.GetAnnotations())
 			if len(kubeletFeatureGates) == 0 {
@@ -778,6 +773,15 @@ func (r *Reconciler) ensureInstanceExistsForMachine(
 				externalCloudProvider, _ = strconv.ParseBool(val)
 			}
 
+			cloudConfig, kubeletCloudProviderName, err := prov.GetCloudConfig(machine.Spec)
+			if err != nil {
+				return nil, fmt.Errorf("failed to render cloud config: %w", err)
+			}
+
+			if providerConfig.CloudProvider == providerconfigtypes.CloudProviderVsphere && externalCloudProvider {
+				cloudConfig = ""
+			}
+
 			registryCredentials, err := containerruntime.GetContainerdAuthConfig(ctx, r.client, r.nodeSettings.RegistryCredentialsSecretRef)
 			if err != nil {
 				return nil, fmt.Errorf("failed to get containerd auth config: %w", err)
@@ -794,23 +798,6 @@ func (r *Reconciler) ensureInstanceExistsForMachine(
 				crRuntime.ContainerLogMaxFiles = val
 			}
 
-			req := plugin.UserDataRequest{
-				MachineSpec:              machine.Spec,
-				Kubeconfig:               kubeconfig,
-				CloudConfig:              cloudConfig,
-				CloudProviderName:        string(providerConfig.CloudProvider),
-				ExternalCloudProvider:    externalCloudProvider,
-				DNSIPs:                   r.nodeSettings.ClusterDNSIPs,
-				PauseImage:               r.nodeSettings.PauseImage,
-				KubeletCloudProviderName: kubeletCloudProviderName,
-				KubeletFeatureGates:      kubeletFeatureGates,
-				KubeletConfigs:           kubeletConfigs,
-				NoProxy:                  r.nodeSettings.NoProxy,
-				HTTPProxy:                r.nodeSettings.HTTPProxy,
-				ContainerRuntime:         crRuntime,
-				NodePortRange:            r.nodePortRange,
-			}
-
 			// Here we do stuff!
 			var userdata string
 
@@ -838,8 +825,25 @@ func (r *Reconciler) ensureInstanceExistsForMachine(
 					return nil, fmt.Errorf(CloudInitNotReadyError, bootstrap.BootstrapCloudConfig, machine.Name)
 				}
 
-				userdata = getOSMBootstrapUserdata(req.MachineSpec.Name, *bootstrapSecret)
+				userdata = getOSMBootstrapUserdata(machine.Spec.Name, *bootstrapSecret)
 			} else {
+				req := plugin.UserDataRequest{
+					MachineSpec:              machine.Spec,
+					Kubeconfig:               kubeconfig,
+					CloudConfig:              cloudConfig,
+					CloudProviderName:        string(providerConfig.CloudProvider),
+					ExternalCloudProvider:    externalCloudProvider,
+					DNSIPs:                   r.nodeSettings.ClusterDNSIPs,
+					PauseImage:               r.nodeSettings.PauseImage,
+					KubeletCloudProviderName: kubeletCloudProviderName,
+					KubeletFeatureGates:      kubeletFeatureGates,
+					KubeletConfigs:           kubeletConfigs,
+					NoProxy:                  r.nodeSettings.NoProxy,
+					HTTPProxy:                r.nodeSettings.HTTPProxy,
+					ContainerRuntime:         crRuntime,
+					NodePortRange:            r.nodePortRange,
+				}
+
 				userdata, err = userdataPlugin.UserData(req)
 				if err != nil {
 					return nil, fmt.Errorf("failed get userdata: %w", err)
diff --git a/pkg/userdata/amzn2/provider.go b/pkg/userdata/amzn2/provider.go
index 10e5fb48..67fb2f11 100644
--- a/pkg/userdata/amzn2/provider.go
+++ b/pkg/userdata/amzn2/provider.go
@@ -256,10 +256,12 @@ write_files:
   content: |
 {{ kubeletSystemdUnit .ContainerRuntimeName .KubeletVersion .KubeletCloudProviderName .MachineSpec.Name .DNSIPs .ExternalCloudProvider .ProviderSpec.Network.GetIPFamily .PauseImage .MachineSpec.Taints .ExtraKubeletFlags true | indent 4 }}
 
+{{- if ne (len .CloudConfig) 0 }}
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
 {{ .CloudConfig | indent 4 }}
+{{- end }}
 
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
diff --git a/pkg/userdata/centos/provider.go b/pkg/userdata/centos/provider.go
index 3943bf0a..353e8ed6 100644
--- a/pkg/userdata/centos/provider.go
+++ b/pkg/userdata/centos/provider.go
@@ -274,10 +274,12 @@ write_files:
   content: |
 {{ kubeletSystemdUnit .ContainerRuntimeName .KubeletVersion .KubeletCloudProviderName .MachineSpec.Name .DNSIPs .ExternalCloudProvider .ProviderSpec.Network.GetIPFamily .PauseImage .MachineSpec.Taints .ExtraKubeletFlags true | indent 4 }}
 
+{{- if ne (len .CloudConfig) 0 }}
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
 {{ .CloudConfig | indent 4 }}
+{{- end }}
 
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
diff --git a/pkg/userdata/flatcar/provider.go b/pkg/userdata/flatcar/provider.go
index 7ffc944c..6a22a14a 100644
--- a/pkg/userdata/flatcar/provider.go
+++ b/pkg/userdata/flatcar/provider.go
@@ -388,12 +388,14 @@ storage:
         inline: |
 {{ .Kubeconfig | indent 10 }}
 
+{{- if ne (len .CloudConfig) 0 }}
     - path: /etc/kubernetes/cloud-config
       filesystem: root
       mode: 0400
       contents:
         inline: |
 {{ .CloudConfig | indent 10 }}
+{{- end }}
 
     - path: /etc/kubernetes/pki/ca.crt
       filesystem: root
diff --git a/pkg/userdata/rhel/provider.go b/pkg/userdata/rhel/provider.go
index 41016bc2..5eee0898 100644
--- a/pkg/userdata/rhel/provider.go
+++ b/pkg/userdata/rhel/provider.go
@@ -281,10 +281,12 @@ write_files:
   content: |
 {{ kubeletSystemdUnit .ContainerRuntimeName .KubeletVersion .KubeletCloudProviderName .MachineSpec.Name .DNSIPs .ExternalCloudProvider .ProviderSpec.Network.GetIPFamily .PauseImage .MachineSpec.Taints .ExtraKubeletFlags true | indent 4 }}
 
+{{- if ne (len .CloudConfig) 0 }}
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
 {{ .CloudConfig | indent 4 }}
+{{- end }}
 
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
diff --git a/pkg/userdata/rockylinux/provider.go b/pkg/userdata/rockylinux/provider.go
index 7efb0533..c19a5dcd 100644
--- a/pkg/userdata/rockylinux/provider.go
+++ b/pkg/userdata/rockylinux/provider.go
@@ -278,10 +278,12 @@ write_files:
   content: |
 {{ kubeletSystemdUnit .ContainerRuntimeName .KubeletVersion .KubeletCloudProviderName .MachineSpec.Name .DNSIPs .ExternalCloudProvider .ProviderSpec.Network.GetIPFamily .PauseImage .MachineSpec.Taints .ExtraKubeletFlags true | indent 4 }}
 
+{{- if ne (len .CloudConfig) 0 }}
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
 {{ .CloudConfig | indent 4 }}
+{{- end }}
 
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
diff --git a/pkg/userdata/sles/provider.go b/pkg/userdata/sles/provider.go
index 41fbf06a..7e3a3c77 100644
--- a/pkg/userdata/sles/provider.go
+++ b/pkg/userdata/sles/provider.go
@@ -223,10 +223,12 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
 
+{{- if ne (len .CloudConfig) 0 }}
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
 {{ .CloudConfig | indent 4 }}
+{{- end }}
 
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
diff --git a/pkg/userdata/ubuntu/provider.go b/pkg/userdata/ubuntu/provider.go
index 5a83a8a1..2dfb8d3a 100644
--- a/pkg/userdata/ubuntu/provider.go
+++ b/pkg/userdata/ubuntu/provider.go
@@ -270,10 +270,12 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
+{{- if ne (len .CloudConfig) 0 }}
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
 {{ .CloudConfig | indent 4 }}
+{{- end }}
 
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"


Test patch:
diff --git a/pkg/userdata/amzn2/testdata/kubelet-v1.23-aws-external.yaml b/pkg/userdata/amzn2/testdata/kubelet-v1.23-aws-external.yaml
index a3590ffa..41b8b328 100644
--- a/pkg/userdata/amzn2/testdata/kubelet-v1.23-aws-external.yaml
+++ b/pkg/userdata/amzn2/testdata/kubelet-v1.23-aws-external.yaml
@@ -230,7 +230,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/amzn2/testdata/kubelet-v1.23-aws.yaml b/pkg/userdata/amzn2/testdata/kubelet-v1.23-aws.yaml
index 34502bff..c40cdffc 100644
--- a/pkg/userdata/amzn2/testdata/kubelet-v1.23-aws.yaml
+++ b/pkg/userdata/amzn2/testdata/kubelet-v1.23-aws.yaml
@@ -230,7 +230,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere-mirrors.yaml b/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere-mirrors.yaml
index 65c9163f..cec12861 100644
--- a/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere-mirrors.yaml
+++ b/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere-mirrors.yaml
@@ -247,7 +247,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere-proxy.yaml b/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere-proxy.yaml
index b59b08e0..0d8b9b1c 100644
--- a/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere-proxy.yaml
+++ b/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere-proxy.yaml
@@ -247,7 +247,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere.yaml b/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere.yaml
index 3e814c32..623a1df5 100644
--- a/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere.yaml
+++ b/pkg/userdata/amzn2/testdata/kubelet-v1.23-vsphere.yaml
@@ -238,7 +238,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/amzn2/testdata/kubelet-v1.24-aws.yaml b/pkg/userdata/amzn2/testdata/kubelet-v1.24-aws.yaml
index c623222c..eb2122fc 100644
--- a/pkg/userdata/amzn2/testdata/kubelet-v1.24-aws.yaml
+++ b/pkg/userdata/amzn2/testdata/kubelet-v1.24-aws.yaml
@@ -232,7 +232,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/amzn2/testdata/kubelet-v1.25-aws.yaml b/pkg/userdata/amzn2/testdata/kubelet-v1.25-aws.yaml
index 4e1dc46c..a96eb9d8 100644
--- a/pkg/userdata/amzn2/testdata/kubelet-v1.25-aws.yaml
+++ b/pkg/userdata/amzn2/testdata/kubelet-v1.25-aws.yaml
@@ -232,7 +232,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/centos/testdata/kubelet-v1.23-aws-external.yaml b/pkg/userdata/centos/testdata/kubelet-v1.23-aws-external.yaml
index c5189aac..6a137b74 100644
--- a/pkg/userdata/centos/testdata/kubelet-v1.23-aws-external.yaml
+++ b/pkg/userdata/centos/testdata/kubelet-v1.23-aws-external.yaml
@@ -240,7 +240,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/centos/testdata/kubelet-v1.23-aws.yaml b/pkg/userdata/centos/testdata/kubelet-v1.23-aws.yaml
index f9437054..093952f6 100644
--- a/pkg/userdata/centos/testdata/kubelet-v1.23-aws.yaml
+++ b/pkg/userdata/centos/testdata/kubelet-v1.23-aws.yaml
@@ -240,7 +240,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/centos/testdata/kubelet-v1.23-nutanix.yaml b/pkg/userdata/centos/testdata/kubelet-v1.23-nutanix.yaml
index 19a57bbc..ace01123 100644
--- a/pkg/userdata/centos/testdata/kubelet-v1.23-nutanix.yaml
+++ b/pkg/userdata/centos/testdata/kubelet-v1.23-nutanix.yaml
@@ -248,7 +248,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere-mirrors.yaml b/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere-mirrors.yaml
index dd1e83fc..bfc70c0b 100644
--- a/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere-mirrors.yaml
+++ b/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere-mirrors.yaml
@@ -257,7 +257,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere-proxy.yaml b/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere-proxy.yaml
index 6a7352d0..45ff5f31 100644
--- a/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere-proxy.yaml
+++ b/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere-proxy.yaml
@@ -257,7 +257,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere.yaml b/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere.yaml
index 25051264..5db32827 100644
--- a/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere.yaml
+++ b/pkg/userdata/centos/testdata/kubelet-v1.23-vsphere.yaml
@@ -248,7 +248,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/centos/testdata/kubelet-v1.24-aws.yaml b/pkg/userdata/centos/testdata/kubelet-v1.24-aws.yaml
index cf85e964..c1406f19 100644
--- a/pkg/userdata/centos/testdata/kubelet-v1.24-aws.yaml
+++ b/pkg/userdata/centos/testdata/kubelet-v1.24-aws.yaml
@@ -238,7 +238,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/centos/testdata/kubelet-v1.25-aws.yaml b/pkg/userdata/centos/testdata/kubelet-v1.25-aws.yaml
index 1d156ff8..2c9c6dc9 100644
--- a/pkg/userdata/centos/testdata/kubelet-v1.25-aws.yaml
+++ b/pkg/userdata/centos/testdata/kubelet-v1.25-aws.yaml
@@ -238,7 +238,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/kubelet-v1.23-aws-external.yaml b/pkg/userdata/rhel/testdata/kubelet-v1.23-aws-external.yaml
index a7909057..6080a699 100644
--- a/pkg/userdata/rhel/testdata/kubelet-v1.23-aws-external.yaml
+++ b/pkg/userdata/rhel/testdata/kubelet-v1.23-aws-external.yaml
@@ -247,7 +247,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/kubelet-v1.23-aws.yaml b/pkg/userdata/rhel/testdata/kubelet-v1.23-aws.yaml
index 15936469..b9119d15 100644
--- a/pkg/userdata/rhel/testdata/kubelet-v1.23-aws.yaml
+++ b/pkg/userdata/rhel/testdata/kubelet-v1.23-aws.yaml
@@ -247,7 +247,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere-mirrors.yaml b/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere-mirrors.yaml
index 60d49d61..a3e40693 100644
--- a/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere-mirrors.yaml
+++ b/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere-mirrors.yaml
@@ -265,7 +265,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere-proxy.yaml b/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere-proxy.yaml
index dd7d3683..b9a9d49f 100644
--- a/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere-proxy.yaml
+++ b/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere-proxy.yaml
@@ -265,7 +265,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere.yaml b/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere.yaml
index 1e4785fc..7d257924 100644
--- a/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere.yaml
+++ b/pkg/userdata/rhel/testdata/kubelet-v1.23-vsphere.yaml
@@ -256,7 +256,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/kubelet-v1.24-aws-external.yaml b/pkg/userdata/rhel/testdata/kubelet-v1.24-aws-external.yaml
index 5cc28493..3d3488b3 100644
--- a/pkg/userdata/rhel/testdata/kubelet-v1.24-aws-external.yaml
+++ b/pkg/userdata/rhel/testdata/kubelet-v1.24-aws-external.yaml
@@ -245,7 +245,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/kubelet-v1.24-aws.yaml b/pkg/userdata/rhel/testdata/kubelet-v1.24-aws.yaml
index 8e8a5918..7f6a0a31 100644
--- a/pkg/userdata/rhel/testdata/kubelet-v1.24-aws.yaml
+++ b/pkg/userdata/rhel/testdata/kubelet-v1.24-aws.yaml
@@ -245,7 +245,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/kubelet-v1.25-aws.yaml b/pkg/userdata/rhel/testdata/kubelet-v1.25-aws.yaml
index 8ee45c1f..4c0bd145 100644
--- a/pkg/userdata/rhel/testdata/kubelet-v1.25-aws.yaml
+++ b/pkg/userdata/rhel/testdata/kubelet-v1.25-aws.yaml
@@ -245,7 +245,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/kubelet-v1.25-nutanix.yaml b/pkg/userdata/rhel/testdata/kubelet-v1.25-nutanix.yaml
index 7ae0c8f3..66b93cd2 100644
--- a/pkg/userdata/rhel/testdata/kubelet-v1.25-nutanix.yaml
+++ b/pkg/userdata/rhel/testdata/kubelet-v1.25-nutanix.yaml
@@ -254,7 +254,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rhel/testdata/pod-cidr-azure-rhel.yaml b/pkg/userdata/rhel/testdata/pod-cidr-azure-rhel.yaml
index f48f536b..ad57862c 100644
--- a/pkg/userdata/rhel/testdata/pod-cidr-azure-rhel.yaml
+++ b/pkg/userdata/rhel/testdata/pod-cidr-azure-rhel.yaml
@@ -251,7 +251,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-aws-external.yaml b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-aws-external.yaml
index de9e8b81..3d718ee1 100644
--- a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-aws-external.yaml
+++ b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-aws-external.yaml
@@ -247,7 +247,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-aws.yaml b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-aws.yaml
index 871afd16..5c155c38 100644
--- a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-aws.yaml
+++ b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-aws.yaml
@@ -247,7 +247,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-nutanix.yaml b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-nutanix.yaml
index 6280d8c5..6018fe46 100644
--- a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-nutanix.yaml
+++ b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-nutanix.yaml
@@ -255,7 +255,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere-mirrors.yaml b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere-mirrors.yaml
index c77004f2..3cfecc74 100644
--- a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere-mirrors.yaml
+++ b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere-mirrors.yaml
@@ -264,7 +264,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere-proxy.yaml b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere-proxy.yaml
index 968eaf04..929a9aed 100644
--- a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere-proxy.yaml
+++ b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere-proxy.yaml
@@ -264,7 +264,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere.yaml b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere.yaml
index 2900f5c3..f0d5c8ea 100644
--- a/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere.yaml
+++ b/pkg/userdata/rockylinux/testdata/kubelet-v1.23-vsphere.yaml
@@ -255,7 +255,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rockylinux/testdata/kubelet-v1.24-aws.yaml b/pkg/userdata/rockylinux/testdata/kubelet-v1.24-aws.yaml
index 7af96633..f1a87ecc 100644
--- a/pkg/userdata/rockylinux/testdata/kubelet-v1.24-aws.yaml
+++ b/pkg/userdata/rockylinux/testdata/kubelet-v1.24-aws.yaml
@@ -245,7 +245,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/rockylinux/testdata/kubelet-v1.25-aws.yaml b/pkg/userdata/rockylinux/testdata/kubelet-v1.25-aws.yaml
index c532a922..2c82621c 100644
--- a/pkg/userdata/rockylinux/testdata/kubelet-v1.25-aws.yaml
+++ b/pkg/userdata/rockylinux/testdata/kubelet-v1.25-aws.yaml
@@ -245,7 +245,6 @@ write_files:
 
     [Install]
     WantedBy=multi-user.target
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/sles/testdata/dist-upgrade-on-boot.yaml b/pkg/userdata/sles/testdata/dist-upgrade-on-boot.yaml
index d3c8cab0..db5c5a07 100644
--- a/pkg/userdata/sles/testdata/dist-upgrade-on-boot.yaml
+++ b/pkg/userdata/sles/testdata/dist-upgrade-on-boot.yaml
@@ -201,11 +201,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/sles/testdata/kubelet-version-without-v-prefix.yaml b/pkg/userdata/sles/testdata/kubelet-version-without-v-prefix.yaml
index d4a8e4b4..0c8d538f 100644
--- a/pkg/userdata/sles/testdata/kubelet-version-without-v-prefix.yaml
+++ b/pkg/userdata/sles/testdata/kubelet-version-without-v-prefix.yaml
@@ -199,11 +199,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/sles/testdata/multiple-dns-servers.yaml b/pkg/userdata/sles/testdata/multiple-dns-servers.yaml
index f6eae6a3..256c9678 100644
--- a/pkg/userdata/sles/testdata/multiple-dns-servers.yaml
+++ b/pkg/userdata/sles/testdata/multiple-dns-servers.yaml
@@ -199,11 +199,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/sles/testdata/multiple-ssh-keys.yaml b/pkg/userdata/sles/testdata/multiple-ssh-keys.yaml
index 7e68ecab..73f64c41 100644
--- a/pkg/userdata/sles/testdata/multiple-ssh-keys.yaml
+++ b/pkg/userdata/sles/testdata/multiple-ssh-keys.yaml
@@ -201,11 +201,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/sles/testdata/openstack-overwrite-cloud-config.yaml b/pkg/userdata/sles/testdata/openstack-overwrite-cloud-config.yaml
index 6bdf72df..e03af45d 100644
--- a/pkg/userdata/sles/testdata/openstack-overwrite-cloud-config.yaml
+++ b/pkg/userdata/sles/testdata/openstack-overwrite-cloud-config.yaml
@@ -200,7 +200,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/sles/testdata/openstack.yaml b/pkg/userdata/sles/testdata/openstack.yaml
index 11cc6565..fe64d675 100644
--- a/pkg/userdata/sles/testdata/openstack.yaml
+++ b/pkg/userdata/sles/testdata/openstack.yaml
@@ -200,7 +200,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/sles/testdata/version-1.23.13.yaml b/pkg/userdata/sles/testdata/version-1.23.13.yaml
index d4a8e4b4..0c8d538f 100644
--- a/pkg/userdata/sles/testdata/version-1.23.13.yaml
+++ b/pkg/userdata/sles/testdata/version-1.23.13.yaml
@@ -199,11 +199,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/sles/testdata/version-1.24.7.yaml b/pkg/userdata/sles/testdata/version-1.24.7.yaml
index dffeefca..4177de04 100644
--- a/pkg/userdata/sles/testdata/version-1.24.7.yaml
+++ b/pkg/userdata/sles/testdata/version-1.24.7.yaml
@@ -198,11 +198,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/sles/testdata/version-1.25.3.yaml b/pkg/userdata/sles/testdata/version-1.25.3.yaml
index 30681b8d..d301bdb0 100644
--- a/pkg/userdata/sles/testdata/version-1.25.3.yaml
+++ b/pkg/userdata/sles/testdata/version-1.25.3.yaml
@@ -198,11 +198,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/sles/testdata/vsphere-mirrors.yaml b/pkg/userdata/sles/testdata/vsphere-mirrors.yaml
index 14f503d8..5d6625bc 100644
--- a/pkg/userdata/sles/testdata/vsphere-mirrors.yaml
+++ b/pkg/userdata/sles/testdata/vsphere-mirrors.yaml
@@ -211,7 +211,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/sles/testdata/vsphere-proxy.yaml b/pkg/userdata/sles/testdata/vsphere-proxy.yaml
index 0ea26f72..e24d417c 100644
--- a/pkg/userdata/sles/testdata/vsphere-proxy.yaml
+++ b/pkg/userdata/sles/testdata/vsphere-proxy.yaml
@@ -211,7 +211,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/sles/testdata/vsphere.yaml b/pkg/userdata/sles/testdata/vsphere.yaml
index df58c104..d2b24d66 100644
--- a/pkg/userdata/sles/testdata/vsphere.yaml
+++ b/pkg/userdata/sles/testdata/vsphere.yaml
@@ -201,7 +201,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/var/run/netconfig/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/containerd.yaml b/pkg/userdata/ubuntu/testdata/containerd.yaml
index fff144f5..a9145f64 100644
--- a/pkg/userdata/ubuntu/testdata/containerd.yaml
+++ b/pkg/userdata/ubuntu/testdata/containerd.yaml
@@ -245,11 +245,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/digitalocean-dualstack.yaml b/pkg/userdata/ubuntu/testdata/digitalocean-dualstack.yaml
index 83120b0c..e9325a05 100644
--- a/pkg/userdata/ubuntu/testdata/digitalocean-dualstack.yaml
+++ b/pkg/userdata/ubuntu/testdata/digitalocean-dualstack.yaml
@@ -242,7 +242,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/dist-upgrade-on-boot.yaml b/pkg/userdata/ubuntu/testdata/dist-upgrade-on-boot.yaml
index 2857fb81..99474c11 100644
--- a/pkg/userdata/ubuntu/testdata/dist-upgrade-on-boot.yaml
+++ b/pkg/userdata/ubuntu/testdata/dist-upgrade-on-boot.yaml
@@ -245,11 +245,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/docker.yaml b/pkg/userdata/ubuntu/testdata/docker.yaml
index d761c1a2..eb31b4c9 100644
--- a/pkg/userdata/ubuntu/testdata/docker.yaml
+++ b/pkg/userdata/ubuntu/testdata/docker.yaml
@@ -245,11 +245,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/kubelet-version-without-v-prefix.yaml b/pkg/userdata/ubuntu/testdata/kubelet-version-without-v-prefix.yaml
index fef7938b..e9226242 100644
--- a/pkg/userdata/ubuntu/testdata/kubelet-version-without-v-prefix.yaml
+++ b/pkg/userdata/ubuntu/testdata/kubelet-version-without-v-prefix.yaml
@@ -243,11 +243,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/multiple-dns-servers.yaml b/pkg/userdata/ubuntu/testdata/multiple-dns-servers.yaml
index 5dd08723..0f68c6f1 100644
--- a/pkg/userdata/ubuntu/testdata/multiple-dns-servers.yaml
+++ b/pkg/userdata/ubuntu/testdata/multiple-dns-servers.yaml
@@ -243,11 +243,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/multiple-ssh-keys.yaml b/pkg/userdata/ubuntu/testdata/multiple-ssh-keys.yaml
index ed129f53..7b9f2a6e 100644
--- a/pkg/userdata/ubuntu/testdata/multiple-ssh-keys.yaml
+++ b/pkg/userdata/ubuntu/testdata/multiple-ssh-keys.yaml
@@ -245,11 +245,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/nutanix.yaml b/pkg/userdata/ubuntu/testdata/nutanix.yaml
index 34480661..bbbc89e3 100644
--- a/pkg/userdata/ubuntu/testdata/nutanix.yaml
+++ b/pkg/userdata/ubuntu/testdata/nutanix.yaml
@@ -245,7 +245,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/openstack-dualstack.yaml b/pkg/userdata/ubuntu/testdata/openstack-dualstack.yaml
index be1c64a2..f862a2f7 100644
--- a/pkg/userdata/ubuntu/testdata/openstack-dualstack.yaml
+++ b/pkg/userdata/ubuntu/testdata/openstack-dualstack.yaml
@@ -242,7 +242,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/openstack-overwrite-cloud-config.yaml b/pkg/userdata/ubuntu/testdata/openstack-overwrite-cloud-config.yaml
index 5e7ec012..c2d25c5a 100644
--- a/pkg/userdata/ubuntu/testdata/openstack-overwrite-cloud-config.yaml
+++ b/pkg/userdata/ubuntu/testdata/openstack-overwrite-cloud-config.yaml
@@ -244,7 +244,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/openstack.yaml b/pkg/userdata/ubuntu/testdata/openstack.yaml
index b087ed87..c9c4306b 100644
--- a/pkg/userdata/ubuntu/testdata/openstack.yaml
+++ b/pkg/userdata/ubuntu/testdata/openstack.yaml
@@ -244,7 +244,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/version-1.23.13.yaml b/pkg/userdata/ubuntu/testdata/version-1.23.13.yaml
index fbe60e5d..ae7b981d 100644
--- a/pkg/userdata/ubuntu/testdata/version-1.23.13.yaml
+++ b/pkg/userdata/ubuntu/testdata/version-1.23.13.yaml
@@ -241,11 +241,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/version-1.24.7.yaml b/pkg/userdata/ubuntu/testdata/version-1.24.7.yaml
index bfc934f3..8dbed92e 100644
--- a/pkg/userdata/ubuntu/testdata/version-1.24.7.yaml
+++ b/pkg/userdata/ubuntu/testdata/version-1.24.7.yaml
@@ -240,11 +240,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/version-1.25.3.yaml b/pkg/userdata/ubuntu/testdata/version-1.25.3.yaml
index 524eb9fa..a2a512b4 100644
--- a/pkg/userdata/ubuntu/testdata/version-1.25.3.yaml
+++ b/pkg/userdata/ubuntu/testdata/version-1.25.3.yaml
@@ -240,11 +240,6 @@ write_files:
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
 
-- path: "/etc/kubernetes/cloud-config"
-  permissions: "0600"
-  content: |
-
-
 - path: "/opt/bin/setup_net_env.sh"
   permissions: "0755"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/vsphere-mirrors.yaml b/pkg/userdata/ubuntu/testdata/vsphere-mirrors.yaml
index 31c647d6..81cb912c 100644
--- a/pkg/userdata/ubuntu/testdata/vsphere-mirrors.yaml
+++ b/pkg/userdata/ubuntu/testdata/vsphere-mirrors.yaml
@@ -255,7 +255,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/vsphere-proxy.yaml b/pkg/userdata/ubuntu/testdata/vsphere-proxy.yaml
index 16127b36..27d0f8ae 100644
--- a/pkg/userdata/ubuntu/testdata/vsphere-proxy.yaml
+++ b/pkg/userdata/ubuntu/testdata/vsphere-proxy.yaml
@@ -255,7 +255,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |
diff --git a/pkg/userdata/ubuntu/testdata/vsphere.yaml b/pkg/userdata/ubuntu/testdata/vsphere.yaml
index 8d838337..aeb8fb52 100644
--- a/pkg/userdata/ubuntu/testdata/vsphere.yaml
+++ b/pkg/userdata/ubuntu/testdata/vsphere.yaml
@@ -245,7 +245,6 @@ write_files:
   content: |
     [Service]
     Environment="KUBELET_EXTRA_ARGS=--resolv-conf=/run/systemd/resolve/resolv.conf"
-
 - path: "/etc/kubernetes/cloud-config"
   permissions: "0600"
   content: |