Skip to content

Commit

Permalink
CentOS docker repo being abandoned, replaced with RHEL (#3336)
Browse files Browse the repository at this point in the history
Signed-off-by: Artiom Diomin <artiom@kubermatic.com>
Co-authored-by: Artiom Diomin <artiom@kubermatic.com>
  • Loading branch information
kubermatic-bot and kron4eg authored Aug 7, 2024
1 parent 9b48c6a commit 4d20609
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 22 deletions.
7 changes: 1 addition & 6 deletions pkg/scripts/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,7 @@ var containerRuntimeTemplates = map[string]string{
"yum-containerd": heredoc.Docf(`
{{ if .CONFIGURE_REPOSITORIES }}
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
{{- /*
Due to DNF modules we have to do this on docker-ce repo
More info at: https://bugzilla.redhat.com/show_bug.cgi?id=1756473
*/}}
sudo yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
sudo yum-config-manager --add-repo=https://download.docker.com/linux/rhel/docker-ce.repo
{{ end }}
sudo yum versionlock delete containerd.io || true
Expand Down
3 changes: 1 addition & 2 deletions pkg/scripts/testdata/TestKubeadmCentOS-cilium_cluster.golden
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ sudo yum install -y \


sudo yum install -y yum-utils
sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
sudo yum-config-manager --add-repo=https://download.docker.com/linux/rhel/docker-ce.repo


sudo yum versionlock delete containerd.io || true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ sudo systemctl enable --now iscsid


sudo yum install -y yum-utils
sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
sudo yum-config-manager --add-repo=https://download.docker.com/linux/rhel/docker-ce.repo


sudo yum versionlock delete containerd.io || true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ sudo yum install -y \


sudo yum install -y yum-utils
sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
sudo yum-config-manager --add-repo=https://download.docker.com/linux/rhel/docker-ce.repo


sudo yum versionlock delete containerd.io || true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ sudo yum install -y \


sudo yum install -y yum-utils
sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
sudo yum-config-manager --add-repo=https://download.docker.com/linux/rhel/docker-ce.repo


sudo yum versionlock delete containerd.io || true
Expand Down
3 changes: 1 addition & 2 deletions pkg/scripts/testdata/TestUpgradeKubeadmAndCNICentOS.golden
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ sudo yum install -y \


sudo yum install -y yum-utils
sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
sudo yum-config-manager --add-repo=https://download.docker.com/linux/rhel/docker-ce.repo


sudo yum versionlock delete containerd.io || true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ sudo yum install -y \


sudo yum install -y yum-utils
sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo yum-config-manager --save --setopt=docker-ce-stable.module_hotfixes=true
sudo yum-config-manager --add-repo=https://download.docker.com/linux/rhel/docker-ce.repo


sudo yum versionlock delete containerd.io || true
Expand Down
8 changes: 4 additions & 4 deletions pkg/tasks/prerequisites.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ func disableNMCloudSetup(s *state.State, node *kubeoneapi.HostConfig, _ executor
func installKubeadm(s *state.State, node kubeoneapi.HostConfig) error {
return runOnOS(s, node.OperatingSystem, map[kubeoneapi.OperatingSystemName]runOnOSFn{
kubeoneapi.OperatingSystemNameAmazon: installKubeadmAmazonLinux,
kubeoneapi.OperatingSystemNameCentOS: installKubeadmCentOS,
kubeoneapi.OperatingSystemNameCentOS: installKubeadmRHELAndAlike,
kubeoneapi.OperatingSystemNameDebian: installKubeadmDebian,
kubeoneapi.OperatingSystemNameFlatcar: installKubeadmFlatcar,
kubeoneapi.OperatingSystemNameRHEL: installKubeadmCentOS,
kubeoneapi.OperatingSystemNameRockyLinux: installKubeadmCentOS,
kubeoneapi.OperatingSystemNameRHEL: installKubeadmRHELAndAlike,
kubeoneapi.OperatingSystemNameRockyLinux: installKubeadmRHELAndAlike,
kubeoneapi.OperatingSystemNameUbuntu: installKubeadmDebian,
})
}
Expand All @@ -216,7 +216,7 @@ func installKubeadmDebian(s *state.State) error {
return fail.SSH(err, "installing kubeadm")
}

func installKubeadmCentOS(s *state.State) error {
func installKubeadmRHELAndAlike(s *state.State) error {
cmd, err := scripts.KubeadmCentOS(s.Cluster, s.ForceInstall)
if err != nil {
return err
Expand Down

0 comments on commit 4d20609

Please sign in to comment.