Skip to content

Commit 85ed54c

Browse files
authored
Apply band-aid to reanimate CentOS8 bootstraping (#1183)
Signed-off-by: Artiom Diomin <[email protected]>
1 parent 99ad415 commit 85ed54c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/controller/machine/bootstrap.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ systemctl restart kubelet-healthcheck.service
230230

231231
bootstrapYumBinContentTemplate = `#!/bin/bash
232232
set -xeuo pipefail
233+
source /etc/os-release
234+
if [ "$ID" == "centos" ] && [ "$VERSION_ID" == "8" ]; then
235+
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
236+
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
237+
fi
233238
{{- if .EnterpriseLinux }}
234239
yum install epel-release -y
235240
{{- end }}
@@ -241,7 +246,7 @@ systemctl daemon-reload
241246
systemctl restart setup.service
242247
systemctl restart kubelet.service
243248
systemctl restart kubelet-healthcheck.service
244-
`
249+
`
245250

246251
bootstrapZypperBinContentTemplate = `#!/bin/bash
247252
set -xeuo pipefail

0 commit comments

Comments
 (0)