95
95
overwrite : false
96
96
tableType : gpt
97
97
files :
98
+ - content : |
99
+ network:
100
+ version: 2
101
+ ethernets:
102
+ eth0:
103
+ mtu: 1400
104
+ match:
105
+ macaddress: MACADDRESS
106
+ set-name: eth0
107
+ owner: root:root
108
+ path: /etc/netplan/60-eth0.yaml
109
+ permissions: "0644"
110
+ - contentFrom :
111
+ secret :
112
+ key : control-plane-azure.json
113
+ name : ${CLUSTER_NAME}-control-plane-azure-json
114
+ owner : root:root
115
+ path : /etc/kubernetes/azure.json
116
+ permissions : " 0644"
98
117
- content : |
99
118
#!/bin/bash
100
119
@@ -144,13 +163,6 @@ spec:
144
163
owner: root:root
145
164
path: /tmp/replace-k8s-components.sh
146
165
permissions: "0744"
147
- - contentFrom :
148
- secret :
149
- key : control-plane-azure.json
150
- name : ${CLUSTER_NAME}-control-plane-azure-json
151
- owner : root:root
152
- path : /etc/kubernetes/azure.json
153
- permissions : " 0644"
154
166
initConfiguration :
155
167
nodeRegistration :
156
168
kubeletExtraArgs :
@@ -169,6 +181,9 @@ spec:
169
181
- - LABEL=etcd_disk
170
182
- /var/lib/etcddisk
171
183
postKubeadmCommands :
184
+ - mac=$(ip -o link | grep eth0 | grep ether | awk '{ print $17 }')
185
+ - sed -i -e "s/MACADDRESS/$${mac}/g" /etc/netplan/60-eth0.yaml
186
+ - netplan apply
172
187
- bash -c /tmp/replace-k8s-components.sh
173
188
preKubeadmCommands :
174
189
- bash -c /tmp/replace-k8s-binaries.sh
@@ -260,6 +275,25 @@ spec:
260
275
template :
261
276
spec :
262
277
files :
278
+ - contentFrom :
279
+ secret :
280
+ key : worker-node-azure.json
281
+ name : ${CLUSTER_NAME}-md-0-azure-json
282
+ owner : root:root
283
+ path : /etc/kubernetes/azure.json
284
+ permissions : " 0644"
285
+ - content : |
286
+ network:
287
+ version: 2
288
+ ethernets:
289
+ eth0:
290
+ mtu: 1400
291
+ match:
292
+ macaddress: MACADDRESS
293
+ set-name: eth0
294
+ owner: root:root
295
+ path: /etc/netplan/60-eth0.yaml
296
+ permissions: "0644"
263
297
- content : |
264
298
#!/bin/bash
265
299
@@ -281,13 +315,6 @@ spec:
281
315
owner: root:root
282
316
path: /tmp/replace-k8s-binaries.sh
283
317
permissions: "0744"
284
- - contentFrom :
285
- secret :
286
- key : control-plane-azure.json
287
- name : ${CLUSTER_NAME}-control-plane-azure-json
288
- owner : root:root
289
- path : /etc/kubernetes/azure.json
290
- permissions : " 0644"
291
318
joinConfiguration :
292
319
nodeRegistration :
293
320
kubeletExtraArgs :
0 commit comments