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

E2E tests bug fix #944

Merged
merged 2 commits into from
Jan 19, 2024
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
7 changes: 5 additions & 2 deletions test/eks-cluster-test/cluster-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ kind: ClusterConfig
metadata:
name: nth-eks-cluster-test
region: us-west-2
version: '1.22'
version: '1.27'
cloudWatch:
clusterLogging:
enableTypes: ["*"]
managedNodeGroups:
- name: linux-ng
instanceType: t3.large
instanceType: t3.medium
amiFamily: AmazonLinux2
desiredCapacity: 2
minSize: 2
maxSize: 2
spot: true
nodeGroups:
- name: windows-ng
instanceType: m5.large
Expand Down
2 changes: 1 addition & 1 deletion test/eks-cluster-test/provision-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CLUSTER_NAME="nth-eks-cluster-test"
cluster_exists=$(eksctl get cluster --region $REGION | grep "$CLUSTER_NAME" || :)
if [[ -z $cluster_exists ]]; then
echo "🥑 Provisioning EKS cluster"
eksctl create cluster -f $CLUSTER_CONFIG_FILE --install-vpc-controllers
eksctl create cluster -f $CLUSTER_CONFIG_FILE
else
echo "🥑 $CLUSTER_NAME already exists; continuing with test run"
fi
Expand Down
7 changes: 2 additions & 5 deletions test/eks-cluster-test/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ echo "INSTANCE_METADATA_URL=${INSTANCE_METADATA_URL:=$EC2_METADATA_URL}"

# Label first linux node in cluster; nth will be deployed to this node ONLY -- NEEDED FOR LINUX RUN ONLY:
if [[ $TEST_OS = "linux" ]]; then
nth_node=$(kubectl get node --selector="kubernetes.io/os=linux" --output jsonpath='{.items[-1].metadata.name}')
nth_node=$(kubectl get node --selector="kubernetes.io/os=linux" --output jsonpath='{.items[0].metadata.name}')
export NTH_WORKER_LABEL="role=nth_worker"
kubectl label nodes $nth_node $NTH_WORKER_LABEL --overwrite
fi
Expand All @@ -171,10 +171,7 @@ if ! kubectl get svc >/dev/null 2>&1; then
exit 1
fi

TEST_NODE=$(kubectl get nodes -l kubernetes.io/os=$TEST_OS |
tail -n +2 |
tr -s "\t" " " |
cut -d" " -f1)
TEST_NODE=$(kubectl get nodes -l kubernetes.io/os=$TEST_OS --output jsonpath='{.items[0].metadata.name}')
export TEST_NODE
echo "TEST_NODE=${TEST_NODE:?"not found"}"

Expand Down
Loading