Skip to content

Commit

Permalink
Use dedicated keyring for docker packages (#3485)
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 Dec 16, 2024
1 parent 9f733d6 commit a8eff5f
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 21 deletions.
9 changes: 6 additions & 3 deletions pkg/scripts/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ var containerRuntimeTemplates = map[string]string{
{{ if .CONFIGURE_REPOSITORIES }}
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common lsb-release
curl -fsSL https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]')/gpg |
sudo apt-key add -
sudo add-apt-repository "deb https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable"
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
{{ end }}
sudo apt-mark unhold containerd.io || true
Expand Down
9 changes: 6 additions & 3 deletions pkg/scripts/testdata/TestKubeadmDebian-cilium_cluster.golden
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ kube_ver="1.30.0-*"

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common lsb-release
curl -fsSL https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]')/gpg |
sudo apt-key add -
sudo add-apt-repository "deb https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable"
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update


sudo apt-mark unhold containerd.io || true
Expand Down
9 changes: 6 additions & 3 deletions pkg/scripts/testdata/TestKubeadmDebian-nutanix_cluster.golden
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ kube_ver="1.30.0-*"

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common lsb-release
curl -fsSL https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]')/gpg |
sudo apt-key add -
sudo add-apt-repository "deb https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable"
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update


sudo apt-mark unhold containerd.io || true
Expand Down
9 changes: 6 additions & 3 deletions pkg/scripts/testdata/TestKubeadmDebian-with_containerd.golden
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ kube_ver="1.30.0-*"

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common lsb-release
curl -fsSL https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]')/gpg |
sudo apt-key add -
sudo add-apt-repository "deb https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable"
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update


sudo apt-mark unhold containerd.io || true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ kube_ver="1.30.0-*"

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common lsb-release
curl -fsSL https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]')/gpg |
sudo apt-key add -
sudo add-apt-repository "deb https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable"
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update


sudo apt-mark unhold containerd.io || true
Expand Down
9 changes: 6 additions & 3 deletions pkg/scripts/testdata/TestUpgradeKubeadmAndCNIDebian.golden
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ sudo apt-mark unhold kubelet kubeadm kubectl kubernetes-cni cri-tools

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common lsb-release
curl -fsSL https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]')/gpg |
sudo apt-key add -
sudo add-apt-repository "deb https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable"
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update


sudo apt-mark unhold containerd.io || true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ sudo apt-mark unhold kubelet kubeadm kubectl kubernetes-cni cri-tools

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common lsb-release
curl -fsSL https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]')/gpg |
sudo apt-key add -
sudo add-apt-repository "deb https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable"
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo "deb [signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update


sudo apt-mark unhold containerd.io || true
Expand Down

0 comments on commit a8eff5f

Please sign in to comment.