File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ OUTPOST_INSTANCE_TYPE=${OUTPOST_INSTANCE_TYPE:-${INSTANCE_TYPE}}
3535# kops: must include patch version (e.g. 1.19.1)
3636# eksctl: mustn't include patch version (e.g. 1.19)
3737# NOTE: Keep KOPS at v1.29.x until ELB usage bug fixed
38- K8S_VERSION_KOPS=${K8S_VERSION_KOPS:- 1.29.6 }
38+ K8S_VERSION_KOPS=${K8S_VERSION_KOPS:- 1.31.1 }
3939K8S_VERSION_EKSCTL=${K8S_VERSION_EKSCTL:- 1.31}
4040
4141EBS_INSTALL_SNAPSHOT=${EBS_INSTALL_SNAPSHOT:- " true" }
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ function kops_create_cluster() {
3232 KOPS_PATCH_FILE=${10}
3333 KOPS_PATCH_NODE_FILE=${11}
3434 KOPS_STATE_FILE=${12}
35+ export KOPS_RUN_TOO_NEW_VERSION=true
3536
3637 if kops_cluster_exists " ${CLUSTER_NAME} " " ${KOPS_BIN} " " ${KOPS_STATE_FILE} " ; then
3738 loudecho " Replacing cluster $CLUSTER_NAME with $CLUSTER_FILE "
@@ -74,6 +75,7 @@ function kops_cluster_exists() {
7475 CLUSTER_NAME=${1}
7576 KOPS_BIN=${2}
7677 KOPS_STATE_FILE=${3}
78+ export KOPS_RUN_TOO_NEW_VERSION=true
7779 set +e
7880 if ${KOPS_BIN} get cluster --state " ${KOPS_STATE_FILE} " " ${CLUSTER_NAME} " ; then
7981 set -e
@@ -88,6 +90,7 @@ function kops_delete_cluster() {
8890 KOPS_BIN=${1}
8991 CLUSTER_NAME=${2}
9092 KOPS_STATE_FILE=${3}
93+ export KOPS_RUN_TOO_NEW_VERSION=true
9194 loudecho " Deleting cluster ${CLUSTER_NAME} "
9295 ${KOPS_BIN} delete cluster --name " ${CLUSTER_NAME} " --state " ${KOPS_STATE_FILE} " --yes
9396}
@@ -99,7 +102,7 @@ function kops_patch_cluster_file() {
99102 KOPS_PATCH_FILE=${2} # input must be yaml
100103 KIND=${3} # must be either Cluster or InstanceGroup
101104 ROLE=${4} # must be either Master or Node
102-
105+ export KOPS_RUN_TOO_NEW_VERSION=true
103106 loudecho " Patching cluster $CLUSTER_NAME with $KOPS_PATCH_FILE "
104107
105108 # Temporary intermediate files for patching, don't mutate CLUSTER_FILE until
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ GOMPLATE_VERSION="v4.1.0"
3333# https://github.com/helm/helm
3434HELM_VERSION=" v3.16.2"
3535# https://github.com/kubernetes/kops
36- # NOTE: Keep at v1.29.0 until ELB usage bug fixed
37- KOPS_VERSION= " v1.29.0 "
36+ # NOTE: We pin kops to a commit instead of a release to support newer versions of k8s earlier
37+ KOPS_COMMIT= " aaa35cc5304f9b191ca9828b552e62bddc5b263a "
3838# https://pkg.go.dev/sigs.k8s.io/kubetest2?tab=versions
3939KUBETEST2_VERSION=" v0.0.0-20240905095256-f6e8664cd2b1"
4040# https://github.com/golang/mock
@@ -153,9 +153,11 @@ function install_helm() {
153153}
154154
155155function install_kops() {
156+ # Build from source so we can test latest Kubernetes version earlier.
156157 INSTALL_PATH=" ${1} "
157158
158- install_binary " ${INSTALL_PATH} " " https://github.com/kubernetes/kops/releases/download/${KOPS_VERSION} /kops-${OS} -${ARCH} " " kops"
159+ # Lower max processes to avoid oom-killed
160+ GOMAXPROCS=1 install_go " ${INSTALL_PATH} " " k8s.io/kops/cmd/kops@${KOPS_COMMIT} "
159161}
160162
161163function install_kubetest2() {
You can’t perform that action at this time.
0 commit comments