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

Remove Calico test suite from weekly integration tests #2559

Merged
merged 1 commit into from
Sep 13, 2023
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
12 changes: 0 additions & 12 deletions .github/workflows/weekly-cron-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,3 @@ jobs:
run: |
./scripts/run-integration-tests.sh
if: always()
- name: Run calico tests
env:
DISABLE_PROMPT: true
ROLE_CREATE: false
ROLE_ARN: ${{ secrets.EKS_CLUSTER_ROLE_ARN }}
RUN_CNI_INTEGRATION_TESTS: false
RUN_CALICO_TEST: true
RUN_LATEST_CALICO_VERSION: true
RUN_TESTER_LB_ADDONS: true
run: |
./scripts/run-integration-tests.sh
if: always()
9 changes: 4 additions & 5 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ This README covers the prerequisites and instructions for running the scripts.
#### Tests
The following tests are valid to run, and setting the respective environment variable to true will run them:
1. CNI Integration Tests - `RUN_CNI_INTEGRATION_TESTS`
2. Calico Tests - `RUN_CALICO_TEST`
3. Conformance Tests - `RUN_CONFORMANCE`
4. Performance Tests - `RUN_PERFORMANCE_TESTS`
5. KOPS Tests - `RUN_KOPS_TEST`
6. Bottlerocket Tests - `RUN_BOTTLEROCKET_TEST`
2. Conformance Tests - `RUN_CONFORMANCE`
3. Performance Tests - `RUN_PERFORMANCE_TESTS`
4. KOPS Tests - `RUN_KOPS_TEST`
5. Bottlerocket Tests - `RUN_BOTTLEROCKET_TEST`

Example for running performance tests:
```
Expand Down
33 changes: 0 additions & 33 deletions scripts/lib/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,6 @@ function run_kops_conformance() {
echo "TIMELINE: KOPS tests took $KOPS_TEST_DURATION seconds."

sleep 240 #Workaround to avoid ENI leakage during cluster deletion: https://github.com/aws/amazon-vpc-cni-k8s/issues/1223

}

function run_calico_test() {
echo "Starting Helm installing Tigera operator and running Calico STAR tests"
pushd ./test
VPC_ID=$(eksctl get cluster $CLUSTER_NAME -oyaml | grep vpc | cut -d ":" -f 2 | awk '{$1=$1};1')

calico_version=$CALICO_VERSION
if [[ $1 == "true" ]]; then
# we can automatically use latest version in Calico repo, or use the known highest version (currently v3.23.0)
if [[ $RUN_LATEST_CALICO_VERSION == true ]]; then
version_tag=$(curl -i https://api.github.com/repos/projectcalico/calico/releases/latest | grep "tag_name") || true
if [[ -n $version_tag ]]; then
calico_version=$(echo $version_tag | cut -d ":" -f 2 | cut -d '"' -f 2 )
else
echo "Getting Calico latest version failed, will fall back to default/set version $calico_version instead"
fi
else echo "Using default Calico version"
fi
echo "Using Calico version $calico_version to test"
else
version=$(kubectl describe ds -n calico-system calico-node | grep "calico/node:" | cut -d ':' -f3)
echo "Calico has been installed in testing cluster, keep using the version $version"
fi

echo "Testing amd64"
instance_type="amd64"
ginkgo -v integration/calico -- --cluster-kubeconfig=$KUBECONFIG --cluster-name=$CLUSTER_NAME --aws-region=$AWS_DEFAULT_REGION --aws-vpc-id=$VPC_ID --calico-version=$calico_version --instance-type=$instance_type --install-calico=$1
echo "Testing arm64"
instance_type="arm64"
ginkgo -v integration/calico -- --cluster-kubeconfig=$KUBECONFIG --cluster-name=$CLUSTER_NAME --aws-region=$AWS_DEFAULT_REGION --aws-vpc-id=$VPC_ID --calico-version=$calico_version --instance-type=$instance_type --install-calico=false
popd
}

function build_and_push_image(){
Expand Down
27 changes: 0 additions & 27 deletions scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ ARCH=$(go env GOARCH)
: "${RUN_BOTTLEROCKET_TEST:=false}"
: "${RUN_PERFORMANCE_TESTS:=false}"
: "${RUNNING_PERFORMANCE:=false}"
: "${RUN_CALICO_TEST:=false}"
: "${RUN_LATEST_CALICO_VERSION:=false}"
: "${CALICO_VERSION:=v3.25.0}"
: "${RUN_CALICO_TEST_WITH_PD:=true}"
: "${KOPS_VERSION=v1.26.4}"

__cluster_created=0
Expand All @@ -48,9 +44,6 @@ on_error() {
if [[ $RUN_KOPS_TEST == true ]]; then
emit_cloudwatch_metric "kops_test_status" "0"
fi
if [[ $RUN_CALICO_TEST == true ]]; then
emit_cloudwatch_metric "calico_test_status" "0"
fi
if [[ $RUN_BOTTLEROCKET_TEST == true ]]; then
emit_cloudwatch_metric "bottlerocket_test_status" "0"
fi
Expand Down Expand Up @@ -250,26 +243,6 @@ if [[ $RUN_CNI_INTEGRATION_TESTS == true ]]; then
fi
fi

if [[ $RUN_CALICO_TEST == true ]]; then
# need to install Calico
run_calico_test "true"
if [[ "$RUN_CALICO_TEST_WITH_PD" == true ]]; then
# if we run prefix delegation tests as well, we need update CNI env and terminate all nodes to restore iptables rules for following tests
echo "Run Calico tests with Prefix Delegation enabled"
$KUBECTL_PATH set env daemonset aws-node -n kube-system ENABLE_PREFIX_DELEGATION=true
# we shouldn't rely on other tests to set this required ENV
$KUBECTL_PATH set env ds aws-node -n kube-system WARM_PREFIX_TARGET=1
ids=( $(aws ec2 describe-instances --filters Name=vpc-id,Values=$VPC_ID --query 'Reservations[*].Instances[*].InstanceId' --output text) )
aws ec2 terminate-instances --instance-ids $ids
echo "Waiting 15 minutes for new nodes being ready"
sleep 900
# no longer need to install Calico again for PD
run_calico_test "false"
fi

emit_cloudwatch_metric "calico_test_status" "1"
fi

if [[ $TEST_PASS -eq 0 && "$RUN_CONFORMANCE" == true ]]; then
echo "Running conformance tests against cluster."
START=$SECONDS
Expand Down
5 changes: 0 additions & 5 deletions scripts/run-release-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,3 @@ export RUN_KOPS_TEST=true
echo "Running KOPS test"
./scripts/run-integration-tests.sh
unset RUN_KOPS_TEST

export RUN_CALICO_TEST=true
echo "Running calico test"
./scripts/run-integration-tests.sh
unset RUN_CALICO_TEST
3 changes: 0 additions & 3 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ Ginkgo Focus: [SMOKE]
# Bottlerocket
* set RUN_BOTTLEROCKET_TEST=true

# Calico
* set RUN_CALICO_TEST=true

## How to Manually delete k8s tester Resources (order of deletion)
Cloudformation - (all except cluster, vpc)
EC2 - load balancers, key pair
Expand Down