Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to ebs disk size and dealing with instances #28

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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