mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 04:03:20 +00:00
Add support for preemptible instances in node-e2e
Preemptible instances are cheaper, and the small chanse of a vm being killed doesn't matter when running during development. This is a tradeoff the user should be able to decide on. More info here: https://cloud.google.com/compute/docs/instances/preemptible The default setting is false, so unless setting PREEMPTIBLE_INSTANCES=true, everything will behave as before. Signed-off-by: Odin Ugedal <odin@ugedal.com>
This commit is contained in:
@@ -94,6 +94,7 @@ if [ "${remote}" = true ] ; then
|
||||
instance_prefix=${INSTANCE_PREFIX:-"test"}
|
||||
cleanup=${CLEANUP:-"true"}
|
||||
delete_instances=${DELETE_INSTANCES:-"false"}
|
||||
preemptible_instances=${PREEMPTIBLE_INSTANCES:-"false"}
|
||||
test_suite=${TEST_SUITE:-"default"}
|
||||
|
||||
# Get the compute zone
|
||||
@@ -149,7 +150,7 @@ if [ "${remote}" = true ] ; then
|
||||
--image-project="${image_project}" --instance-name-prefix="${instance_prefix}" \
|
||||
--delete-instances="${delete_instances}" --test_args="${test_args}" --instance-metadata="${metadata}" \
|
||||
--image-config-file="${image_config_file}" --system-spec-name="${system_spec_name}" \
|
||||
--extra-envs="${extra_envs}" --test-suite="${test_suite}" \
|
||||
--preemptible-instances="${preemptible_instances}" --extra-envs="${extra_envs}" --test-suite="${test_suite}" \
|
||||
2>&1 | tee -i "${artifacts}/build-log.txt"
|
||||
exit $?
|
||||
|
||||
|
Reference in New Issue
Block a user