Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
32 changes: 32 additions & 0 deletions scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ 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}"
: "${KOPS_VERSION=v1.33.0-beta.1}"

Expand Down Expand Up @@ -57,6 +59,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 +289,30 @@ 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

GINKGO_TEST_BUILD="$SCRIPT_DIR/../test/build"
TEST_IMAGE_REGISTRY=${TEST_IMAGE_REGISTRY:-"617930562442.dkr.ecr.us-west-2.amazonaws.com"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated change to point to public ecr..


(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" \
--cluster-name="$CLUSTER_NAME" \
--aws-region="$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 +328,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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not sure why set min as max here?

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