Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/v1.4] Fix Flatcar: mkdir /opt/bin before untar anything in it #2305

Merged
merged 1 commit into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/scripts/os_flatcar.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ source /etc/kubeone/proxy-env
{{ template "sysctl-k8s" . }}
{{ template "journald-config" }}

sudo mkdir -p /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
sudo mkdir -p /opt/bin /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
curl -L "https://github.com/containernetworking/plugins/releases/download/v{{ .KUBERNETES_CNI_VERSION }}/cni-plugins-linux-${HOST_ARCH}-v{{ .KUBERNETES_CNI_VERSION }}.tgz" |
sudo tar -C /opt/cni/bin -xz

Expand All @@ -47,7 +47,6 @@ curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOO
{{ template "flatcar-containerd" . }}
{{ end }}

sudo mkdir -p /opt/bin
cd /opt/bin
k8s_rel_baseurl=https://storage.googleapis.com/kubernetes-release/release
for binary in kubeadm kubelet kubectl; do
Expand Down
3 changes: 1 addition & 2 deletions pkg/scripts/testdata/TestKubeadmFlatcar-force.golden
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ EOF
sudo systemctl force-reload systemd-journald


sudo mkdir -p /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
sudo mkdir -p /opt/bin /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
curl -L "https://github.com/containernetworking/plugins/releases/download/v0.8.7/cni-plugins-linux-${HOST_ARCH}-v0.8.7.tgz" |
sudo tar -C /opt/cni/bin -xz

Expand Down Expand Up @@ -94,7 +94,6 @@ sudo systemctl restart docker



sudo mkdir -p /opt/bin
cd /opt/bin
k8s_rel_baseurl=https://storage.googleapis.com/kubernetes-release/release
for binary in kubeadm kubelet kubectl; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ EOF
sudo systemctl force-reload systemd-journald


sudo mkdir -p /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
sudo mkdir -p /opt/bin /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
curl -L "https://github.com/containernetworking/plugins/releases/download/v0.8.7/cni-plugins-linux-${HOST_ARCH}-v0.8.7.tgz" |
sudo tar -C /opt/cni/bin -xz

Expand Down Expand Up @@ -94,7 +94,6 @@ sudo systemctl restart docker



sudo mkdir -p /opt/bin
cd /opt/bin
k8s_rel_baseurl=https://storage.googleapis.com/kubernetes-release/release
for binary in kubeadm kubelet kubectl; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ EOF
sudo systemctl force-reload systemd-journald


sudo mkdir -p /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
sudo mkdir -p /opt/bin /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
curl -L "https://github.com/containernetworking/plugins/releases/download/v0.8.7/cni-plugins-linux-${HOST_ARCH}-v0.8.7.tgz" |
sudo tar -C /opt/cni/bin -xz

Expand Down Expand Up @@ -97,7 +97,6 @@ sudo systemctl restart docker



sudo mkdir -p /opt/bin
cd /opt/bin
k8s_rel_baseurl=https://storage.googleapis.com/kubernetes-release/release
for binary in kubeadm kubelet kubectl; do
Expand Down
3 changes: 1 addition & 2 deletions pkg/scripts/testdata/TestKubeadmFlatcar-simple.golden
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ EOF
sudo systemctl force-reload systemd-journald


sudo mkdir -p /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
sudo mkdir -p /opt/bin /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
curl -L "https://github.com/containernetworking/plugins/releases/download/v0.8.7/cni-plugins-linux-${HOST_ARCH}-v0.8.7.tgz" |
sudo tar -C /opt/cni/bin -xz

Expand Down Expand Up @@ -94,7 +94,6 @@ sudo systemctl restart docker



sudo mkdir -p /opt/bin
cd /opt/bin
k8s_rel_baseurl=https://storage.googleapis.com/kubernetes-release/release
for binary in kubeadm kubelet kubectl; do
Expand Down
3 changes: 1 addition & 2 deletions pkg/scripts/testdata/TestKubeadmFlatcar-with_cilium.golden
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ EOF
sudo systemctl force-reload systemd-journald


sudo mkdir -p /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
sudo mkdir -p /opt/bin /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
curl -L "https://github.com/containernetworking/plugins/releases/download/v0.8.7/cni-plugins-linux-${HOST_ARCH}-v0.8.7.tgz" |
sudo tar -C /opt/cni/bin -xz

Expand All @@ -74,7 +74,6 @@ curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOO



sudo mkdir -p /opt/bin
cd /opt/bin
k8s_rel_baseurl=https://storage.googleapis.com/kubernetes-release/release
for binary in kubeadm kubelet kubectl; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ EOF
sudo systemctl force-reload systemd-journald


sudo mkdir -p /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
sudo mkdir -p /opt/bin /opt/cni/bin /etc/kubernetes/pki /etc/kubernetes/manifests
curl -L "https://github.com/containernetworking/plugins/releases/download/v0.8.7/cni-plugins-linux-${HOST_ARCH}-v0.8.7.tgz" |
sudo tar -C /opt/cni/bin -xz

Expand Down Expand Up @@ -111,7 +111,6 @@ sudo systemctl restart containerd



sudo mkdir -p /opt/bin
cd /opt/bin
k8s_rel_baseurl=https://storage.googleapis.com/kubernetes-release/release
for binary in kubeadm kubelet kubectl; do
Expand Down