Merge pull request #122178 from saschagrunert/cni-plugins
Update cni-plugins to v1.4.0
This commit is contained in:
		@@ -18,7 +18,7 @@ dependencies:
 | 
			
		||||
 | 
			
		||||
  # CNI plugins
 | 
			
		||||
  - name: "cni"
 | 
			
		||||
    version: 1.3.0
 | 
			
		||||
    version: 1.4.0
 | 
			
		||||
    refPaths:
 | 
			
		||||
    - path: cluster/gce/config-common.sh
 | 
			
		||||
      match: WINDOWS_CNI_VERSION=
 | 
			
		||||
 
 | 
			
		||||
@@ -136,7 +136,7 @@ export WINDOWS_CNI_CONFIG_DIR="${WINDOWS_K8S_DIR}\cni\config"
 | 
			
		||||
# CNI storage path for Windows nodes
 | 
			
		||||
export WINDOWS_CNI_STORAGE_PATH="https://storage.googleapis.com/k8s-artifacts-cni/release"
 | 
			
		||||
# CNI version for Windows nodes
 | 
			
		||||
export WINDOWS_CNI_VERSION="v1.3.0"
 | 
			
		||||
export WINDOWS_CNI_VERSION="v1.4.0"
 | 
			
		||||
# Pod manifests directory for Windows nodes on Windows nodes.
 | 
			
		||||
export WINDOWS_MANIFESTS_DIR="${WINDOWS_K8S_DIR}\manifests"
 | 
			
		||||
# Directory where cert/key files will be stores on Windows nodes.
 | 
			
		||||
 
 | 
			
		||||
@@ -24,8 +24,8 @@ set -o nounset
 | 
			
		||||
set -o pipefail
 | 
			
		||||
 | 
			
		||||
### Hardcoded constants
 | 
			
		||||
DEFAULT_CNI_VERSION='v1.3.0'
 | 
			
		||||
DEFAULT_CNI_HASH='5d0324ca8a3c90c680b6e1fddb245a2255582fa15949ba1f3c6bb7323df9d3af754dae98d6e40ac9ccafb2999c932df2c4288d418949a4915d928eb23c090540'
 | 
			
		||||
DEFAULT_CNI_VERSION='v1.4.0'
 | 
			
		||||
DEFAULT_CNI_HASH='993cf3284c6ffe5d803692de033d17941cffad8e58a1d8b8a41bba850eaf51a90c8a590b3e61c428a350aae39bcf77ec3901a64a71f6767e8e82c262671362c0'
 | 
			
		||||
DEFAULT_NPD_VERSION='v0.8.13'
 | 
			
		||||
DEFAULT_NPD_HASH_AMD64='f9d8499741f06e76ec2426c8ccebb4b5102e1e45c183b6a19671e1ec61ff2568c354307959c9910a579014807ae674e8633c8c0ea2d878fafae1b136ec7ff5da'
 | 
			
		||||
DEFAULT_NPD_HASH_ARM64='c8f46c8d89a4f17df93d1f62a886de9d22cef29e6971354932cba1fa2837ebcacbd18888c0487034febe0b7f2eea289e3348e0b2f57f2f69a338f6ff8da20ed5'
 | 
			
		||||
 
 | 
			
		||||
@@ -54,7 +54,7 @@ LIMITED_SWAP=${LIMITED_SWAP:-""}
 | 
			
		||||
 | 
			
		||||
# required for cni installation
 | 
			
		||||
CNI_CONFIG_DIR=${CNI_CONFIG_DIR:-/etc/cni/net.d}
 | 
			
		||||
CNI_PLUGINS_VERSION=${CNI_PLUGINS_VERSION:-"v1.3.0"}
 | 
			
		||||
CNI_PLUGINS_VERSION=${CNI_PLUGINS_VERSION:-"v1.4.0"}
 | 
			
		||||
# The arch of the CNI binary, if not set, will be fetched based on the value of `uname -m`
 | 
			
		||||
CNI_TARGETARCH=${CNI_TARGETARCH:-""}
 | 
			
		||||
CNI_PLUGINS_URL="https://github.com/containernetworking/plugins/releases/download"
 | 
			
		||||
@@ -1180,19 +1180,20 @@ function install_cni {
 | 
			
		||||
    host_arch=$(detect_arch)
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  cni_plugin_sha=CNI_PLUGINS_${host_arch^^}_SHA256SUM
 | 
			
		||||
  cni_plugin_tarball="${CNI_PLUGINS_VERSION}/cni-plugins-linux-${host_arch}-${CNI_PLUGINS_VERSION}.tgz"
 | 
			
		||||
  cni_plugins_url="${CNI_PLUGINS_URL}/${cni_plugin_tarball}"
 | 
			
		||||
  cni_plugin_tarball="cni-plugins-linux-${host_arch}-${CNI_PLUGINS_VERSION}.tgz"
 | 
			
		||||
  cni_plugins_url="${CNI_PLUGINS_URL}/${CNI_PLUGINS_VERSION}/${cni_plugin_tarball}"
 | 
			
		||||
  cni_plugin_sha_url="${cni_plugins_url}.sha256"
 | 
			
		||||
 | 
			
		||||
  echo "Installing CNI plugin binaries ..." \
 | 
			
		||||
    && curl -sSL --retry 5 --output "${TMP_DIR}"/cni."${host_arch}".tgz "${cni_plugins_url}" \
 | 
			
		||||
    && echo "${!cni_plugin_sha} ${TMP_DIR}/cni.${host_arch}.tgz" | tee "${TMP_DIR}"/cni.sha256 \
 | 
			
		||||
    && sha256sum --ignore-missing -c "${TMP_DIR}"/cni.sha256 \
 | 
			
		||||
    && rm -f "${TMP_DIR}"/cni.sha256 \
 | 
			
		||||
    && sudo mkdir -p /opt/cni/bin \
 | 
			
		||||
    && sudo tar -C /opt/cni/bin -xzvf "${TMP_DIR}"/cni."${host_arch}".tgz \
 | 
			
		||||
    && rm -rf "${TMP_DIR}"/cni."${host_arch}".tgz \
 | 
			
		||||
    && sudo find /opt/cni/bin -type f -not \( \
 | 
			
		||||
  echo "Installing CNI plugin binaries ..." &&
 | 
			
		||||
    cd "${TMP_DIR}" &&
 | 
			
		||||
    curl -sSL --retry 5 -o "${cni_plugin_tarball}" "${cni_plugins_url}" &&
 | 
			
		||||
    curl -sSL --retry 5 -o "${cni_plugin_tarball}.sha256" "${cni_plugin_sha_url}" &&
 | 
			
		||||
    sha256sum -c "${cni_plugin_tarball}.sha256" &&
 | 
			
		||||
    rm -f "${cni_plugin_tarball}.sha256" &&
 | 
			
		||||
    sudo mkdir -p /opt/cni/bin &&
 | 
			
		||||
    sudo tar -C /opt/cni/bin -xzvf "${cni_plugin_tarball}" &&
 | 
			
		||||
    rm -rf "${cni_plugin_tarball}" &&
 | 
			
		||||
    sudo find /opt/cni/bin -type f -not \( \
 | 
			
		||||
        -iname host-local \
 | 
			
		||||
        -o -iname bridge \
 | 
			
		||||
        -o -iname portmap \
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@ import (
 | 
			
		||||
// utils.go contains functions used across test suites.
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	cniVersion       = "v1.3.0"
 | 
			
		||||
	cniVersion       = "v1.4.0"
 | 
			
		||||
	cniDirectory     = "cni/bin" // The CNI tarball places binaries under directory under "cni/bin".
 | 
			
		||||
	cniConfDirectory = "cni/net.d"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user