diff --git a/hack/e2e/config.sh b/hack/e2e/config.sh index b09e7cac28..89847ca8b4 100644 --- a/hack/e2e/config.sh +++ b/hack/e2e/config.sh @@ -35,7 +35,7 @@ OUTPOST_INSTANCE_TYPE=${OUTPOST_INSTANCE_TYPE:-${INSTANCE_TYPE}} # kops: must include patch version (e.g. 1.19.1) # eksctl: mustn't include patch version (e.g. 1.19) # NOTE: Keep KOPS at v1.29.x until ELB usage bug fixed -K8S_VERSION_KOPS=${K8S_VERSION_KOPS:-1.29.6} +K8S_VERSION_KOPS=${K8S_VERSION_KOPS:-1.31.1} K8S_VERSION_EKSCTL=${K8S_VERSION_EKSCTL:-1.31} EBS_INSTALL_SNAPSHOT=${EBS_INSTALL_SNAPSHOT:-"true"} diff --git a/hack/e2e/kops/kops.sh b/hack/e2e/kops/kops.sh index c76bd90841..4f8dd9dec4 100644 --- a/hack/e2e/kops/kops.sh +++ b/hack/e2e/kops/kops.sh @@ -32,6 +32,7 @@ function kops_create_cluster() { KOPS_PATCH_FILE=${10} KOPS_PATCH_NODE_FILE=${11} KOPS_STATE_FILE=${12} + export KOPS_RUN_TOO_NEW_VERSION=true if kops_cluster_exists "${CLUSTER_NAME}" "${KOPS_BIN}" "${KOPS_STATE_FILE}"; then loudecho "Replacing cluster $CLUSTER_NAME with $CLUSTER_FILE" @@ -74,6 +75,7 @@ function kops_cluster_exists() { CLUSTER_NAME=${1} KOPS_BIN=${2} KOPS_STATE_FILE=${3} + export KOPS_RUN_TOO_NEW_VERSION=true set +e if ${KOPS_BIN} get cluster --state "${KOPS_STATE_FILE}" "${CLUSTER_NAME}"; then set -e @@ -88,6 +90,7 @@ function kops_delete_cluster() { KOPS_BIN=${1} CLUSTER_NAME=${2} KOPS_STATE_FILE=${3} + export KOPS_RUN_TOO_NEW_VERSION=true loudecho "Deleting cluster ${CLUSTER_NAME}" ${KOPS_BIN} delete cluster --name "${CLUSTER_NAME}" --state "${KOPS_STATE_FILE}" --yes } @@ -99,7 +102,7 @@ function kops_patch_cluster_file() { KOPS_PATCH_FILE=${2} # input must be yaml KIND=${3} # must be either Cluster or InstanceGroup ROLE=${4} # must be either Master or Node - + export KOPS_RUN_TOO_NEW_VERSION=true loudecho "Patching cluster $CLUSTER_NAME with $KOPS_PATCH_FILE" # Temporary intermediate files for patching, don't mutate CLUSTER_FILE until diff --git a/hack/tools/install.sh b/hack/tools/install.sh index 2cee9d96b2..9ce493a502 100755 --- a/hack/tools/install.sh +++ b/hack/tools/install.sh @@ -33,8 +33,8 @@ GOMPLATE_VERSION="v4.1.0" # https://github.com/helm/helm HELM_VERSION="v3.15.4" # https://github.com/kubernetes/kops -# NOTE: Keep at v1.29.0 until ELB usage bug fixed -KOPS_VERSION="v1.29.0" +# NOTE: We pin kops to a commit instead of a release to support newer versions of k8s earlier +KOPS_COMMIT="aaa35cc5304f9b191ca9828b552e62bddc5b263a" # https://pkg.go.dev/sigs.k8s.io/kubetest2?tab=versions KUBETEST2_VERSION="v0.0.0-20240703180642-53f3d216ad9f" # https://github.com/golang/mock @@ -153,9 +153,11 @@ function install_helm() { } function install_kops() { + # Build from source so we can test latest Kubernetes version earlier. INSTALL_PATH="${1}" - install_binary "${INSTALL_PATH}" "https://github.com/kubernetes/kops/releases/download/${KOPS_VERSION}/kops-${OS}-${ARCH}" "kops" + # Lower max processes to avoid oom-killed + GOMAXPROCS=1 install_go "${INSTALL_PATH}" "k8s.io/kops/cmd/kops@${KOPS_COMMIT}" } function install_kubetest2() {