Skip to content

Commit

Permalink
test scenarios: recognize KOPS_CONTROL_PLANE_COUNT
Browse files Browse the repository at this point in the history
We still accept KOPS_CONTROL_PLANE_SIZE (for now), but we should be
switching to KOPS_CONTROL_PLANE_COUNT
  • Loading branch information
justinsb committed Jul 19, 2023
1 parent 7352f30 commit 3b834a2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tests/e2e/scenarios/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,17 @@ function kops-up() {
create_args="${create_args} --discovery-store=${DISCOVERY_STORE}/${CLUSTER_NAME}/discovery"
fi

# TODO: Switch scripts to use KOPS_CONTROL_PLANE_COUNT
if [[ -n "${KOPS_CONTROL_PLANE_SIZE:-}" ]]; then
echo "Recognized (deprecated) KOPS_CONTROL_PLANE_SIZE=${KOPS_CONTROL_PLANE_SIZE}, please set KOPS_CONTROL_PLANE_COUNT instead"
KOPS_CONTROL_PLANE_COUNT=${KOPS_CONTROL_PLANE_SIZE}
fi

${KUBETEST2} \
--up \
--kops-binary-path="${KOPS}" \
--kubernetes-version="${K8S_VERSION}" \
--create-args="${create_args}" \
--control-plane-size="${KOPS_CONTROL_PLANE_SIZE:-1}" \
--control-plane-count="${KOPS_CONTROL_PLANE_COUNT:-1}" \
--template-path="${KOPS_TEMPLATE-}"
}
8 changes: 7 additions & 1 deletion tests/e2e/scenarios/upgrade-ab/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,17 @@ if [[ ${KOPS_IRSA-} = true ]]; then
create_args="${create_args} --discovery-store=${DISCOVERY_STORE}/${CLUSTER_NAME}/discovery"
fi

# TODO: Switch scripts to use KOPS_CONTROL_PLANE_COUNT
if [[ -n "${KOPS_CONTROL_PLANE_SIZE:-}" ]]; then
echo "Recognized (deprecated) KOPS_CONTROL_PLANE_SIZE=${KOPS_CONTROL_PLANE_SIZE}, please set KOPS_CONTROL_PLANE_COUNT instead"
KOPS_CONTROL_PLANE_COUNT=${KOPS_CONTROL_PLANE_SIZE}
fi

${KUBETEST2} \
--up \
--kops-binary-path="${KOPS_A}" \
--kubernetes-version="${K8S_VERSION_A}" \
--control-plane-count="${KOPS_CONTROL_PLANE_SIZE:-1}" \
--control-plane-count="${KOPS_CONTROL_PLANE_COUNT:-1}" \
--template-path="${KOPS_TEMPLATE:-}" \
--create-args="--networking calico ${KOPS_EXTRA_FLAGS:-} ${create_args}"

Expand Down

0 comments on commit 3b834a2

Please sign in to comment.