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

Fix VPC CNI weekly tests for Bottlerocket and kops #2809

Merged
merged 1 commit into from
Feb 23, 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: 2 additions & 5 deletions .github/workflows/weekly-cron-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
RUN_CNI_INTEGRATION_TESTS: false
PERFORMANCE_TEST_S3_BUCKET_NAME: cni-performance-tests
RUN_PERFORMANCE_TESTS: true
RUN_TESTER_LB_ADDONS: true
run: |
./scripts/run-integration-tests.sh
- name: Run kops tests
Expand All @@ -54,9 +53,8 @@ jobs:
ROLE_ARN: ${{ secrets.EKS_CLUSTER_ROLE_ARN }}
RUN_CNI_INTEGRATION_TESTS: false
RUN_KOPS_TEST: true
RUN_TESTER_LB_ADDONS: true
K8S_VERSION: 1.29.0-alpha.2
KOPS_VERSION: v1.29.0-alpha.2
K8S_VERSION: 1.29.0-alpha.3
KOPS_VERSION: v1.29.0-alpha.3
run: |
./scripts/run-integration-tests.sh
if: always()
Expand All @@ -67,7 +65,6 @@ jobs:
ROLE_ARN: ${{ secrets.EKS_CLUSTER_ROLE_ARN }}
RUN_CNI_INTEGRATION_TESTS: false
RUN_BOTTLEROCKET_TEST: true
RUN_TESTER_LB_ADDONS: true
run: |
./scripts/run-integration-tests.sh
if: always()
3 changes: 1 addition & 2 deletions scripts/lib/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function load_deveks_cluster_details() {
echo "loading cluster details $CLUSTER_NAME"
PROVIDER_ID=$(kubectl get nodes --kubeconfig $KUBE_CONFIG_PATH -ojson | jq -r '.items[0].spec.providerID')
INSTANCE_ID=${PROVIDER_ID##*/}
VPC_ID=$(aws ec2 describe-instances --instance-ids ${INSTANCE_ID} --no-cli-pager | jq -r '.Reservations[].Instances[].VpcId')
VPC_ID=$(aws ec2 describe-instances --instance-ids ${INSTANCE_ID} | jq -r '.Reservations[].Instances[].VpcId')
}

function down-test-cluster() {
Expand Down Expand Up @@ -92,7 +92,6 @@ function up-kops-cluster {
--cloud aws \
--zones ${AWS_DEFAULT_REGION}a,${AWS_DEFAULT_REGION}b \
--networking amazonvpc \
--container-runtime containerd \
--node-count 2 \
--node-size c5.xlarge \
--ssh-public-key=~/.ssh/devopsinuse.pub \
Expand Down
5 changes: 2 additions & 3 deletions scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ ARCH=$(go env GOARCH)
: "${BUILD:=true}"
: "${RUN_CNI_INTEGRATION_TESTS:=true}"
: "${RUN_CONFORMANCE:=false}"
: "${RUN_TESTER_LB_ADDONS:=false}"
: "${RUN_KOPS_TEST:=false}"
: "${RUN_BOTTLEROCKET_TEST:=false}"
: "${RUN_PERFORMANCE_TESTS:=false}"
Expand Down Expand Up @@ -193,7 +192,7 @@ echo "TIMELINE: Upping test cluster took $UP_CLUSTER_DURATION seconds."
# Fetch VPC_ID from created cluster
if [[ "$RUN_KOPS_TEST" == true ]]; then
INSTANCE_ID=$(kubectl get nodes -l node-role.kubernetes.io/node -o jsonpath='{range .items[*]}{@.metadata.name}{"\n"}' | head -1)
VPC_ID=$(aws ec2 describe-instances --instance-ids "$INSTANCE_ID" --no-cli-pager | jq -r '.Reservations[].Instances[].VpcId' )
VPC_ID=$(aws ec2 describe-instances --instance-ids "$INSTANCE_ID" | jq -r '.Reservations[].Instances[].VpcId' )
else
DESCRIBE_CLUSTER_OP=$(aws eks describe-cluster --name "$CLUSTER_NAME" --region "$AWS_DEFAULT_REGION")
VPC_ID=$(echo "$DESCRIBE_CLUSTER_OP" | jq -r '.cluster.resourcesVpcConfig.vpcId')
Expand Down Expand Up @@ -285,7 +284,7 @@ if [[ "$DEPROVISION" == true ]]; then
if [[ "$RUN_KOPS_TEST" == true ]]; then
down-kops-cluster
elif [[ "$RUN_BOTTLEROCKET_TEST" == true ]]; then
eksctl delete cluster $CLUSTER_NAME
eksctl delete cluster $CLUSTER_NAME --disable-nodegroup-eviction
emit_cloudwatch_metric "bottlerocket_test_status" "1"
elif [[ "$RUN_PERFORMANCE_TESTS" == true ]]; then
eksctl delete cluster $CLUSTER_NAME
Expand Down
Loading