Skip to content

Commit

Permalink
Update kubernetes-cni to v1.2.0 and cri-tools to v1.26.0 (#259)
Browse files Browse the repository at this point in the history
* Update kubernetes-cni to v1.2.0 and cri-tools to v1.26.0

Signed-off-by: Marko Mudrinić <[email protected]>

* Fix containerize function

Signed-off-by: Marko Mudrinić <[email protected]>

* Bump OSP version

Signed-off-by: Marko Mudrinić <[email protected]>

Signed-off-by: Marko Mudrinić <[email protected]>
  • Loading branch information
xmudrii authored Jan 24, 2023
1 parent 75b1e83 commit c7ea5ad
Show file tree
Hide file tree
Showing 24 changed files with 86 additions and 66 deletions.
11 changes: 6 additions & 5 deletions deploy/osps/default/osp-amzn2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
spec:
osName: "amzn2"
osVersion: "2.0"
version: "v1.0.2"
version: "v1.0.3"
supportedCloudProviders:
- name: "aws"

Expand Down Expand Up @@ -191,7 +191,7 @@ spec:
fi
{{- /* # CNI variables */}}
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
Expand All @@ -211,16 +211,17 @@ spec:
cd -
{{- /* # cri-tools variables */}}
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
{{- /* download cri-tools */}}
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
{{- /* download cri-tools checksum */}}
{{- /* the cri-tools checksum file has a filename prefix that breaks sha256sum so we need to drop it with sed */}}
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
{{- /* the cri-tools checksum file provides only the checksum without the file name, so we need to handle it specially */}}
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
{{- /* verify cri-tools checksum */}}
Expand Down
11 changes: 6 additions & 5 deletions deploy/osps/default/osp-centos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
spec:
osName: "centos"
osVersion: "7.7"
version: "v1.0.2"
version: "v1.0.3"
supportedCloudProviders:
- name: "alibaba"
- name: "aws"
Expand Down Expand Up @@ -215,7 +215,7 @@ spec:
fi
{{- /* # CNI variables */}}
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
Expand All @@ -235,16 +235,17 @@ spec:
cd -
{{- /* # cri-tools variables */}}
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
{{- /* download cri-tools */}}
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
{{- /* download cri-tools checksum */}}
{{- /* the cri-tools checksum file has a filename prefix that breaks sha256sum so we need to drop it with sed */}}
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
{{- /* the cri-tools checksum file provides only the checksum without the file name, so we need to handle it specially */}}
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
{{- /* verify cri-tools checksum */}}
Expand Down
11 changes: 6 additions & 5 deletions deploy/osps/default/osp-flatcar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
osName: flatcar
## Flatcar Stable (09/11/2021)
osVersion: "2983.2.0"
version: "v1.0.2"
version: "v1.0.3"
supportedCloudProviders:
- name: "aws"
- name: "azure"
Expand Down Expand Up @@ -174,7 +174,7 @@ spec:
fi
{{- /* # CNI variables */}}
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
Expand All @@ -194,16 +194,17 @@ spec:
cd -
{{- /* # cri-tools variables */}}
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
{{- /* download cri-tools */}}
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
{{- /* download cri-tools checksum */}}
{{- /* the cri-tools checksum file has a filename prefix that breaks sha256sum so we need to drop it with sed */}}
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
{{- /* the cri-tools checksum file provides only the checksum without the file name, so we need to handle it specially */}}
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
{{- /* verify cri-tools checksum */}}
Expand Down
11 changes: 6 additions & 5 deletions deploy/osps/default/osp-rhel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
spec:
osName: "rhel"
osVersion: "8.5"
version: "v1.0.2"
version: "v1.0.3"
supportedCloudProviders:
- name: "aws"
- name: "azure"
Expand Down Expand Up @@ -205,7 +205,7 @@ spec:
fi
{{- /* # CNI variables */}}
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
Expand All @@ -225,16 +225,17 @@ spec:
cd -
{{- /* # cri-tools variables */}}
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
{{- /* download cri-tools */}}
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
{{- /* download cri-tools checksum */}}
{{- /* the cri-tools checksum file has a filename prefix that breaks sha256sum so we need to drop it with sed */}}
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
{{- /* the cri-tools checksum file provides only the checksum without the file name, so we need to handle it specially */}}
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
{{- /* verify cri-tools checksum */}}
Expand Down
11 changes: 6 additions & 5 deletions deploy/osps/default/osp-rockylinux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
spec:
osName: "rockylinux"
osVersion: "8.6"
version: "v1.0.2"
version: "v1.0.3"
supportedCloudProviders:
- name: "aws"
- name: "azure"
Expand Down Expand Up @@ -206,7 +206,7 @@ spec:
fi
{{- /* # CNI variables */}}
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
Expand All @@ -226,16 +226,17 @@ spec:
cd -
{{- /* # cri-tools variables */}}
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
{{- /* download cri-tools */}}
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
{{- /* download cri-tools checksum */}}
{{- /* the cri-tools checksum file has a filename prefix that breaks sha256sum so we need to drop it with sed */}}
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
{{- /* the cri-tools checksum file provides only the checksum without the file name, so we need to handle it specially */}}
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
{{- /* verify cri-tools checksum */}}
Expand Down
7 changes: 4 additions & 3 deletions deploy/osps/default/osp-sles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
spec:
osName: sles
osVersion: "15-SP-1"
version: "v1.0.2"
version: "v1.0.3"
supportedCloudProviders:
- name: "aws"

Expand Down Expand Up @@ -179,8 +179,9 @@ spec:
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
{{- /* download cri-tools checksum */}}
{{- /* the cri-tools checksum file has a filename prefix that breaks sha256sum so we need to drop it with sed */}}
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
{{- /* the cri-tools checksum file provides only the checksum without the file name, so we need to handle it specially */}}
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
{{- /* verify cri-tools checksum */}}
Expand Down
11 changes: 6 additions & 5 deletions deploy/osps/default/osp-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
spec:
osName: "ubuntu"
osVersion: "20.04"
version: "v1.0.2"
version: "v1.0.3"
supportedCloudProviders:
- name: "alibaba"
- name: "aws"
Expand Down Expand Up @@ -222,7 +222,7 @@ spec:
fi
{{- /* # CNI variables */}}
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
Expand All @@ -242,16 +242,17 @@ spec:
cd -
{{- /* # cri-tools variables */}}
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
{{- /* download cri-tools */}}
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
{{- /* download cri-tools checksum */}}
{{- /* the cri-tools checksum file has a filename prefix that breaks sha256sum so we need to drop it with sed */}}
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
{{- /* the cri-tools checksum file provides only the checksum without the file name, so we need to handle it specially */}}
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
{{- /* verify cri-tools checksum */}}
Expand Down
7 changes: 6 additions & 1 deletion hack/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ write_junit() {
EOF
}

is_containerized() {
# we're inside a Kubernetes pod/container or inside a container launched by containerize()
[ -n "${KUBERNETES_SERVICE_HOST:-}" ] || [ -n "${CONTAINERIZED:-}" ]
}

containerize() {
local cmd="$1"
local image="${CONTAINERIZE_IMAGE:-quay.io/kubermatic/util:2.0.0}"
Expand All @@ -112,7 +117,7 @@ containerize() {
# short-circuit containerize when in some cases it needs to be avoided
[ -n "$skip" ] && return

if ! [ -f /.dockerenv ]; then
if ! is_containerized; then
echodate "Running $cmd in a Docker container using $image..."
mkdir -p "$gocache"
mkdir -p "$gomodcache"
Expand Down
7 changes: 4 additions & 3 deletions pkg/controllers/osc/testdata/osc-flatcar-aws-containerd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ spec:
;;
esac
fi
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
curl -Lfo "$cni_bin_dir/$cni_filename" "$cni_base_url/$cni_filename"
Expand All @@ -318,11 +318,12 @@ spec:
tar xvf "$cni_filename"
rm -f "$cni_filename"
cd -
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
sha256sum -c <<<"$cri_tools_sum"
tar xvf "$cri_tools_filename"
Expand Down
7 changes: 4 additions & 3 deletions pkg/controllers/osc/testdata/osc-flatcar-aws-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ spec:
;;
esac
fi
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
curl -Lfo "$cni_bin_dir/$cni_filename" "$cni_base_url/$cni_filename"
Expand All @@ -318,11 +318,12 @@ spec:
tar xvf "$cni_filename"
rm -f "$cni_filename"
cd -
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
sha256sum -c <<<"$cri_tools_sum"
tar xvf "$cri_tools_filename"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ spec:
;;
esac
fi
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
curl -Lfo "$cni_bin_dir/$cni_filename" "$cni_base_url/$cni_filename"
Expand All @@ -315,11 +315,12 @@ spec:
tar xvf "$cni_filename"
rm -f "$cni_filename"
cd -
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
sha256sum -c <<<"$cri_tools_sum"
tar xvf "$cri_tools_filename"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ spec:
;;
esac
fi
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
curl -Lfo "$cni_bin_dir/$cni_filename" "$cni_base_url/$cni_filename"
Expand All @@ -318,11 +318,12 @@ spec:
tar xvf "$cni_filename"
rm -f "$cni_filename"
cd -
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
sha256sum -c <<<"$cri_tools_sum"
tar xvf "$cri_tools_filename"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ spec:
;;
esac
fi
CNI_VERSION="${CNI_VERSION:-v1.1.1}"
CNI_VERSION="${CNI_VERSION:-v1.2.0}"
cni_base_url="https://github.com/containernetworking/plugins/releases/download/$CNI_VERSION"
cni_filename="cni-plugins-linux-$arch-$CNI_VERSION.tgz"
curl -Lfo "$cni_bin_dir/$cni_filename" "$cni_base_url/$cni_filename"
Expand All @@ -325,11 +325,12 @@ spec:
tar xvf "$cni_filename"
rm -f "$cni_filename"
cd -
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.22.0}"
CRI_TOOLS_RELEASE="${CRI_TOOLS_RELEASE:-v1.26.0}"
cri_tools_base_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRI_TOOLS_RELEASE}"
cri_tools_filename="crictl-${CRI_TOOLS_RELEASE}-linux-${arch}.tar.gz"
curl -Lfo "$opt_bin/$cri_tools_filename" "$cri_tools_base_url/$cri_tools_filename"
cri_tools_sum=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256" | sed 's/\*\///')
cri_tools_sum_value=$(curl -Lf "$cri_tools_base_url/$cri_tools_filename.sha256")
cri_tools_sum="$cri_tools_sum_value $cri_tools_filename"
cd "$opt_bin"
sha256sum -c <<<"$cri_tools_sum"
tar xvf "$cri_tools_filename"
Expand Down
Loading

0 comments on commit c7ea5ad

Please sign in to comment.