Perf tests on EKS - KM latest, services, instances per service #459
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Perf tests on EKS" | |
run-name: "Perf tests on EKS - KM ${{ inputs.mesh_version != '' && inputs.mesh_version || 'latest' }}, ${{ inputs.num_services }} services, ${{ inputs.instances_per_service }} instances per service" | |
on: | |
schedule: | |
- cron: "0 0 * * 1-5" | |
workflow_dispatch: | |
inputs: | |
mesh_version: | |
description: "Mesh version, if not specified, then version is the latest commit from kong/kong-mesh@master" | |
type: string | |
num_services: | |
description: "Number of services to run during testing" | |
required: true | |
type: number | |
instances_per_service: | |
description: "Number of instances per service to run during testing" | |
required: true | |
type: number | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
perf-test: | |
runs-on: ubuntu-latest | |
env: | |
PERF_TEST_NUM_SERVICES: ${{ inputs.num_services || 1000 }} | |
PERF_TEST_INSTANCES_PER_SERVICE: ${{ inputs.instances_per_service || 2}} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/mesh-perf-ci | |
role-duration-seconds: 7200 | |
aws-region: us-west-1 | |
- name: Setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: make dev/tools | |
run: make dev/tools | |
- name: Calculate number of nodes for cluster | |
run: | |
echo "EKS_NUM_OF_NODES=$(make number-of-nodes)" >> $GITHUB_ENV | |
- name: Start cluster | |
run: ENV=eks make start-cluster | |
- name: Export Terraform outputs | |
env: | |
ENV: eks | |
run: | | |
echo "AWS_REGION=$(make ecr-get-region)" >> $GITHUB_ENV | |
echo "ALTERNATIVE_CONTAINER_REGISTRY=$(make ecr-get-registry)" >> $GITHUB_ENV | |
- name: Configure kubectl | |
run: aws eks --region $AWS_REGION update-kubeconfig --name mesh-perf | |
- name: Get version | |
id: version | |
run: | | |
version="${{ inputs.mesh_version }}" | |
if [[ -z "${version}" ]]; then | |
version=$(curl --silent -L https://docs.konghq.com/mesh/installer.sh | VERSION=preview sh -s - --print-version | tail -n1) | |
fi | |
echo "PERF_TEST_MESH_VERSION=${version}" >> ${GITHUB_ENV} | |
- name: Upload images to ECR | |
run: PERF_TEST_MESH_VERSION="${{ env.PERF_TEST_MESH_VERSION }}" make ecr-push | |
- name: Run tests | |
env: | |
PERF_TEST_STABILIZATION_SLEEP: 30s | |
KMESH_LICENSE_JSON: | | |
${{ secrets.KMESH_LICENSE_JSON }} | |
run: | | |
KMESH_LICENSE=<(printenv KMESH_LICENSE_JSON) PERF_TEST_MESH_VERSION="${{ env.PERF_TEST_MESH_VERSION }}" make run | |
- name: Run resource limits tests | |
env: | |
# when limit memory to 256Mi, it should support 100 dps without GOMEMLIMIT | |
# when limit memory to 128Mi, it should support 100 dps with GOMEMLIMIT | |
PERF_LIMIT_MEGA_MEMORY: 256 | |
# 100 dp = 20x5 | |
PERF_TEST_INSTANCES_PER_SERVICE: 5 | |
PERF_TEST_NUM_SERVICES: 20 | |
PERF_TEST_STABILIZATION_SLEEP: 30s | |
KMESH_LICENSE_JSON: | | |
${{ secrets.KMESH_LICENSE_JSON }} | |
run: | | |
KMESH_LICENSE=<(printenv KMESH_LICENSE_JSON) PERF_TEST_MESH_VERSION="${{ env.PERF_TEST_MESH_VERSION }}" make run/limits | tee /tmp/limits.out | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-metrics-snapshot | |
path: /tmp/prom-snapshots | |
retention-days: 14 | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-reports | |
path: /tmp/perf-test-reports | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: limits-output | |
path: /tmp/limits.out | |
- name: submit logs to Datadog | |
if: always() | |
env: | |
DD_API_KEY: ${{ secrets.DD_API_KEY }} | |
DD_APP_KEY: ${{ secrets.DD_APP_KEY }} | |
run: | | |
go run ./tools/reports/main.go /tmp/perf-test-reports/* | |
- name: Destroy cluster | |
if: always() | |
run: ENV=eks make destroy-cluster |