Skip to content

Commit 8d68e5a

Browse files
committed
Add Ubuntu AMI for Canary Tests
1 parent 312b1d2 commit 8d68e5a

6 files changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/weekly-cron-tests.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,14 @@ jobs:
5757
run: |
5858
./scripts/run-integration-tests.sh
5959
if: always()
60+
- name: Run ubuntu tests
61+
env:
62+
DISABLE_PROMPT: true
63+
ROLE_CREATE: false
64+
ROLE_ARN: ${{ secrets.EKS_CLUSTER_ROLE_ARN }}
65+
RUN_CNI_INTEGRATION_TESTS: false
66+
RUN_UBUNTU_TEST: true
67+
run: |
68+
./scripts/run-integration-tests.sh
69+
if: always()
70+

scripts/lib/cluster.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ function up-test-cluster() {
3030
if [[ "$RUN_BOTTLEROCKET_TEST" == true ]]; then
3131
echo "Copying bottlerocket config to $CLUSTER_CONFIG"
3232
cp $CLUSTER_TEMPLATE_PATH/bottlerocket.yaml $CLUSTER_CONFIG
33+
elif [[ "$RUN_UBUNTU_TEST" == true ]]; then
34+
echo "Copying ubuntu config to $CLUSTER_CONFIG"
35+
cp $CLUSTER_TEMPLATE_PATH/ubuntu.yaml $CLUSTER_CONFIG
3336
elif [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then
3437
echo "Copying perf test cluster config to $CLUSTER_CONFIG"
3538
cp $CLUSTER_TEMPLATE_PATH/perf-cluster.yml $CLUSTER_CONFIG

scripts/run-integration-tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ARCH=$(go env GOARCH)
2828
: "${RUN_CONFORMANCE:=false}"
2929
: "${RUN_KOPS_TEST:=false}"
3030
: "${RUN_BOTTLEROCKET_TEST:=false}"
31+
: "${RUN_UBUNTU_TEST:=false}"
3132
: "${RUN_PERFORMANCE_TESTS:=false}"
3233
: "${RUNNING_PERFORMANCE:=false}"
3334
: "${KOPS_VERSION=v1.33.0-beta.1}"
@@ -54,6 +55,9 @@ on_error() {
5455
if [[ $RUN_BOTTLEROCKET_TEST == true ]]; then
5556
emit_cloudwatch_metric "bottlerocket_test_status" "0"
5657
fi
58+
if [[ $RUN_UBUNTU_TEST == true ]]; then
59+
emit_cloudwatch_metric "ubuntu_test_status" "0"
60+
fi
5761
if [[ $RUN_PERFORMANCE_TESTS == true ]]; then
5862
emit_cloudwatch_metric "performance_test_status" "0"
5963
fi
@@ -296,6 +300,9 @@ if [[ "$DEPROVISION" == true ]]; then
296300
elif [[ "$RUN_BOTTLEROCKET_TEST" == true ]]; then
297301
eksctl delete cluster $CLUSTER_NAME --disable-nodegroup-eviction
298302
emit_cloudwatch_metric "bottlerocket_test_status" "1"
303+
elif [[ "$RUN_UBUNTU_TEST" == true ]]; then
304+
eksctl delete cluster $CLUSTER_NAME --disable-nodegroup-eviction
305+
emit_cloudwatch_metric "ubuntu_test_status" "1"
299306
elif [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then
300307
eksctl delete cluster $CLUSTER_NAME
301308
emit_cloudwatch_metric "performance_test_status" "1"

scripts/run-release-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ echo "Running bottlerocket test"
44
./scripts/run-integration-tests.sh
55
unset RUN_BOTTLEROCKET_TEST
66

7+
export RUN_UBUNTU_TEST=true
8+
chmod +x ./scripts/run-integration-tests.sh
9+
echo "Running ubuntu test"
10+
./scripts/run-integration-tests.sh
11+
unset RUN_UBUNTU_TEST
12+
713
export RUN_WARM_IP_TEST=true
814
echo "Running warm ip test"
915
./scripts/run-integration-tests.sh

scripts/test/config/ubuntu.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
apiVersion: eksctl.io/v1alpha5
3+
kind: ClusterConfig
4+
5+
metadata:
6+
name: CLUSTER_NAME_PLACEHOLDER
7+
region: us-west-2
8+
9+
nodeGroups:
10+
- name: ng-ubuntu
11+
instanceType: m5.large
12+
desiredCapacity: 4
13+
amiFamily: UbuntuPro2404
14+
iam:
15+
attachPolicyARNs:
16+
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
17+
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
18+
- arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
19+
- arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
20+
ubuntu:
21+
settings:
22+
motd: "Hello from eksctl!"

test/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ Ginkgo Focus: [SMOKE]
2626
# Bottlerocket
2727
* set RUN_BOTTLEROCKET_TEST=true
2828

29+
# Ubuntu
30+
* set RUN_UBUNTU_TEST=true
31+
2932
## How to Manually delete k8s tester Resources (order of deletion)
3033
Cloudformation - (all except cluster, vpc)
3134
EC2 - load balancers, key pair

0 commit comments

Comments
 (0)