Skip to content

Commit

Permalink
Replace NODE_TYPE with INSTANCE_TYPE in kops.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
unexge committed Feb 24, 2025
1 parent 80d1a2c commit 5931eb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/e2e-kubernetes/scripts/kops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ function is_cluster_too_old() {
}

function compute_cluster_spec_hash() {
NODE_TYPE=${1}
INSTANCE_TYPE=${1}
ZONES=${2}
AMI_ID=${3}
KOPS_PATCH_NODE_SELINUX_ENFORCING_FILE=${4}

echo -n "${NODE_TYPE}-${ZONES}-${AMI_ID}-${KOPS_PATCH_NODE_SELINUX_ENFORCING_FILE}" | sha256sum | cut -d' ' -f1
echo -n "${INSTANCE_TYPE}-${ZONES}-${AMI_ID}-${KOPS_PATCH_NODE_SELINUX_ENFORCING_FILE}" | sha256sum | cut -d' ' -f1
}

# Checks whether existing cluster matches with expected specs to decide whether to re-use it.
Expand Down Expand Up @@ -72,7 +72,7 @@ function kops_create_cluster() {
SSH_KEY=${13}
KOPS_PATCH_NODE_SELINUX_ENFORCING_FILE=${14}

CLUSTER_SPEC_HASH=$(compute_cluster_spec_hash "${NODE_TYPE}" "${ZONES}" "${AMI_ID}" "${KOPS_PATCH_NODE_SELINUX_ENFORCING_FILE}")
CLUSTER_SPEC_HASH=$(compute_cluster_spec_hash "${INSTANCE_TYPE}" "${ZONES}" "${AMI_ID}" "${KOPS_PATCH_NODE_SELINUX_ENFORCING_FILE}")

# Check if cluster exists and matches our specs
if kops_cluster_exists "${CLUSTER_NAME}" "${BIN}" "${KOPS_STATE_FILE}"; then
Expand Down

0 comments on commit 5931eb1

Please sign in to comment.