Skip to content
Open
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
3 changes: 3 additions & 0 deletions scripts/lib/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ function up-test-cluster() {
if [[ "$RUN_BOTTLEROCKET_TEST" == true ]]; then
echo "Copying bottlerocket config to $CLUSTER_CONFIG"
cp $CLUSTER_TEMPLATE_PATH/bottlerocket.yaml $CLUSTER_CONFIG
elif [[ "$RUN_UBUNTU_TEST" == true ]]; then
echo "Copying ubuntu config to $CLUSTER_CONFIG"
cp $CLUSTER_TEMPLATE_PATH/ubuntu.yaml $CLUSTER_CONFIG
elif [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then
echo "Copying perf test cluster config to $CLUSTER_CONFIG"
cp $CLUSTER_TEMPLATE_PATH/perf-cluster.yml $CLUSTER_CONFIG
Expand Down
37 changes: 37 additions & 0 deletions scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ ARCH=$(go env GOARCH)
: "${RUN_CONFORMANCE:=false}"
: "${RUN_KOPS_TEST:=false}"
: "${RUN_BOTTLEROCKET_TEST:=false}"
: "${RUN_UBUNTU_TEST:=false}"
: "${RUN_PERFORMANCE_TESTS:=false}"
: "${RUN_SOAK_TEST:=false}"
: "${RUNNING_PERFORMANCE:=false}"
: "${EXTRA_GINKGO_FLAGS:=""}"
: "${ENDPOINT_OPTION:=""}"
: "${KOPS_VERSION=v1.33.0-beta.1}"

if [[ -z $EKS_CLUSTER_VERSION || -z $K8S_VERSION ]]; then
Expand Down Expand Up @@ -57,6 +61,9 @@ on_error() {
if [[ $RUN_PERFORMANCE_TESTS == true ]]; then
emit_cloudwatch_metric "performance_test_status" "0"
fi
if [[ $RUN_SOAK_TEST == true ]]; then
emit_cloudwatch_metric "soak_test_status" "0"
fi
# Make sure we destroy any cluster that was created if we hit run into an
# error when attempting to run tests against the
if [[ $RUNNING_PERFORMANCE == false ]]; then
Expand Down Expand Up @@ -284,6 +291,33 @@ if [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then
uninstall_cw_agent
fi

if [[ "$RUN_SOAK_TEST" == true ]]; then
echo "*******************************************************************************"
echo "Running soak tests on current image"
echo ""
START=$SECONDS

echo "Building test binaries..."
make build-test-binaries

GINKGO_TEST_BUILD="$SCRIPT_DIR/../test/build"
TEST_IMAGE_REGISTRY=${TEST_IMAGE_REGISTRY:-"public.ecr.aws/eks"}

(CGO_ENABLED=0 ginkgo $EXTRA_GINKGO_FLAGS --no-color --focus="SOAK_TEST" -v --timeout 3h --fail-on-pending $GINKGO_TEST_BUILD/cni.test -- \
--cluster-kubeconfig="$KUBECONFIG_PATH" \
--cluster-name="$CLUSTER_NAME" \
--aws-region="$AWS_DEFAULT_REGION" \
--aws-vpc-id="$VPC_ID" \
--ng-name-label-key="kubernetes.io/os" \
--ng-name-label-val="linux" \
--test-image-registry=$TEST_IMAGE_REGISTRY \
--publish-cw-metrics=true \
$ENDPOINT_OPTION)

SOAK_DURATION=$((SECONDS - START))
echo "TIMELINE: Soak tests took $SOAK_DURATION seconds."
fi

if [[ $RUN_KOPS_TEST == true ]]; then
run_kops_conformance
fi
Expand All @@ -299,6 +333,9 @@ if [[ "$DEPROVISION" == true ]]; then
elif [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then
eksctl delete cluster $CLUSTER_NAME
emit_cloudwatch_metric "performance_test_status" "1"
elif [[ "$RUN_SOAK_TEST" == true ]]; then
eksctl delete cluster $CLUSTER_NAME --disable-nodegroup-eviction
emit_cloudwatch_metric "soak_test_status" "1"
else
down-test-cluster
fi
Expand Down
52 changes: 52 additions & 0 deletions scripts/test/config/ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
name: CLUSTER_NAME_PLACEHOLDER
region: us-west-2

managedNodeGroups:
- name: cni-test-arm64-ubuntu-mng
instanceType: c6g.xlarge
desiredCapacity: 3
amiFamily: UbuntuPro2404
minSize: 3
maxSize: 3
volumeSize: 40
releaseVersion: ""
preBootstrapCommands:
- |
# Enable unattended upgrades for soak testing
apt-get update
apt-get install -y unattended-upgrades
echo 'Unattended-Upgrade::Automatic-Reboot "false";' >> /etc/apt/apt.conf.d/50unattended-upgrades
echo 'Unattended-Upgrade::Remove-Unused-Dependencies "true";' >> /etc/apt/apt.conf.d/50unattended-upgrades
systemctl enable unattended-upgrades
systemctl start unattended-upgrades
tags:
group: amazon-vpc-cni-k8s-arm64-ubuntu
- name: cni-test-x86-ubuntu-mng
instanceType: c5.xlarge
desiredCapacity: 3
amiFamily: UbuntuPro2404
minSize: 3
maxSize: 3
volumeSize: 40
releaseVersion: ""
preBootstrapCommands:
- |
# Enable unattended upgrades for soak testing
apt-get update
apt-get install -y unattended-upgrades
echo 'Unattended-Upgrade::Automatic-Reboot "false";' >> /etc/apt/apt.conf.d/50unattended-upgrades
echo 'Unattended-Upgrade::Remove-Unused-Dependencies "true";' >> /etc/apt/apt.conf.d/50unattended-upgrades
systemctl enable unattended-upgrades
systemctl start unattended-upgrades
tags:
group: amazon-vpc-cni-k8s-x86-ubuntu
availabilityZones:
- us-west-2a
- us-west-2b
- us-west-2c
- us-west-2d
Loading