diff --git a/hack/e2e/config.sh b/hack/e2e/config.sh index b09e7cac28..ea83d30f9c 100644 --- a/hack/e2e/config.sh +++ b/hack/e2e/config.sh @@ -33,9 +33,8 @@ OUTPOST_ARN=${OUTPOST_ARN:-} 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..883a79ce1e 100644 --- a/hack/e2e/kops/kops.sh +++ b/hack/e2e/kops/kops.sh @@ -19,6 +19,8 @@ set -euo pipefail +export KOPS_RUN_TOO_NEW_VERSION=true + function kops_create_cluster() { CLUSTER_NAME=${1} KOPS_BIN=${2} diff --git a/hack/prow-e2e.sh b/hack/prow-e2e.sh index 9944b828cf..4d331e4dad 100755 --- a/hack/prow-e2e.sh +++ b/hack/prow-e2e.sh @@ -71,6 +71,8 @@ export CLUSTER_NAME="e2e-${BUILD_ID:-${RANDOM}}.k8s.local" export KOPS_BUCKET=${KOPS_BUCKET:-"k8s-kops-csi-shared-e2e"} # Always use us-west-2 in CI, no matter where the local client is export AWS_REGION=us-west-2 +# Allow attempting using newer versions of K8s before kops releases catch up +export KOPS_RUN_TOO_NEW_VERSION=true make cluster/create & PIDS[1]=$! diff --git a/hack/tools/install.sh b/hack/tools/install.sh index 2cee9d96b2..9595bf9339 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="3a8da3d7fc1d632ef5ffe4a6ef7e5e9fc048e0c7" # 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() {