Skip to content

Commit

Permalink
updates to ebs disk size and dealing with instances
Browse files Browse the repository at this point in the history
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
  • Loading branch information
dims committed Jun 20, 2023
1 parent 3292abd commit b263cfc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hack/make-rules/test-e2e-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ target_build_arch=${TARGET_BUILD_ARCH:-""}
runtime_config=${RUNTIME_CONFIG:-""}
instance_prefix=${INSTANCE_PREFIX:-"test"}
cleanup=${CLEANUP:-"true"}
delete_instances=${DELETE_INSTANCES:-"false"}
delete_instances=${DELETE_INSTANCES:-"true"}
instance_profile=${INSTANCE_PROFILE:-""}
user_data_file=${USER_DATA_FILE:-""}
test_suite=${TEST_SUITE:-"default"}
Expand Down
3 changes: 1 addition & 2 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash
export KUBE_BUILD_PLATFORMS="linux/amd64"

DELETE_INSTANCES=true \
FOCUS=NodeConformance \
FOCUS=NodeConformance \
TEST_ARGS='--container-runtime-endpoint=unix:///run/containerd/containerd.sock --container-runtime-process-name=/usr/bin/containerd --container-runtime-pid-file= --kubelet-flags="--cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/containerd.service" --extra-log="{\"name\": \"containerd.log\", \"journalctl\": [\"-u\", \"containerd*\"]}"' \
SSH_USER=ec2-user \
hack/make-rules/test-e2e-node.sh
5 changes: 3 additions & 2 deletions test/e2e_node/remote/aws/aws_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var region = flag.String("region", "", "AWS region that the hosts live in (aws)"
var userDataFile = flag.String("user-data-file", "", "Path to user data to pass to created instances (aws)")
var instanceProfile = flag.String("instance-profile", "", "The name of the instance profile to assign to the node (aws)")
var instanceConnect = flag.Bool("ec2-instance-connect", true, "Use EC2 instance connect to generate a one time use key (aws)")
var reuseInstances = flag.Bool("reuse-instances", false, "Reuse already running instance")

const defaultAWSInstanceType = "t3a.medium"
const amiIDTag = "Node-E2E-Test"
Expand Down Expand Up @@ -276,7 +277,7 @@ func (a *AWSRunner) getAWSInstance(img internalAWSImage) (*awsInstance, error) {
}

var instance *ec2.Instance
if len(existing.Reservations) > 0 && len(existing.Reservations[0].Instances) > 0 {
if *reuseInstances && len(existing.Reservations) > 0 && len(existing.Reservations[0].Instances) > 0 {
instance = existing.Reservations[0].Instances[0]
klog.Infof("reusing existing instance %s", *instance.InstanceId)
} else {
Expand Down Expand Up @@ -449,7 +450,7 @@ func (a *AWSRunner) launchNewInstance(img internalAWSImage) (*ec2.Instance, erro
{
DeviceName: aws.String("/dev/xvda"),
Ebs: &ec2.EbsBlockDevice{
VolumeSize: aws.Int64(20),
VolumeSize: aws.Int64(100),
VolumeType: aws.String("gp3"),
},
},
Expand Down

0 comments on commit b263cfc

Please sign in to comment.