Skip to content

Commit

Permalink
[DO NOT MERGE] Test KOPS_RUN_TOO_NEW_VERSION
Browse files Browse the repository at this point in the history
Signed-off-by: Connor Catlett <[email protected]>
  • Loading branch information
ConnorJC3 committed Oct 16, 2024
1 parent f531748 commit dcadf88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions hack/e2e/kops/kops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +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
declare -x 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"
Expand Down Expand Up @@ -75,7 +75,6 @@ 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
Expand All @@ -90,7 +89,6 @@ 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
}
Expand All @@ -102,7 +100,6 @@ 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
Expand Down
2 changes: 1 addition & 1 deletion hack/tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GOMPLATE_VERSION="v4.1.0"
HELM_VERSION="v3.16.2"
# https://github.com/kubernetes/kops
# NOTE: We pin kops to a commit instead of a release to support newer versions of k8s earlier
KOPS_COMMIT="aaa35cc5304f9b191ca9828b552e62bddc5b263a"
KOPS_COMMIT="c2cd74ac7edbeb0e8c526e472e3453de4acb8997"
# https://pkg.go.dev/sigs.k8s.io/kubetest2?tab=versions
KUBETEST2_VERSION="v0.0.0-20240905095256-f6e8664cd2b1"
# https://github.com/golang/mock
Expand Down

0 comments on commit dcadf88

Please sign in to comment.