Skip to content

Commit

Permalink
test: create pipeline to run scale test (#999)
Browse files Browse the repository at this point in the history
# Description

* Create a new GitHub Workflow to run scale test. 
* The new workflow can be executed manually or reused by other workflow.

## Related Issue

If this pull request is related to any issue, please mention it here.
Additionally, make sure that the issue is assigned to you before
submitting this pull request.

## Checklist

- [ ] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [ ] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [ ] I have correctly attributed the author(s) of the code.
- [ ] I have tested the changes locally.
- [ ] I have followed the project's style guidelines.
- [ ] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.

Signed-off-by: Alex Castilio dos Santos <alexsantos@microsoft.com>
  • Loading branch information
alexcastilio authored Nov 13, 2024
1 parent df6c470 commit 2becd2c
Showing 1 changed file with 132 additions and 0 deletions.
132 changes: 132 additions & 0 deletions .github/workflows/scale-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Scale Test

on:
workflow_dispatch:
inputs:
resource_group:
description: "Azure Resource Group"
required: true
type: string
cluster_name:
description: "AKS Cluster Name"
required: true
type: string
location:
description: "Azure Location"
type: string
default: ${{ vars.AZURE_LOCATION }}
num_deployments:
description: "Number of Traffic Deployments"
default: 1000
type: number
num_replicas:
description: "Number of Traffic Replicas per Deployment"
default: 40
type: number
num_netpol:
description: "Number of Network Policies"
default: 1000
type: number
num_unique_labels_per_pod:
description: "Number of Unique Labels per Pod"
default: 2
type: number
num_unique_labels_per_deployment:
description: "Number of Unique Labels per Deployment"
default: 2
type: number
num_shared_labels_per_pod:
description: "Number of Shared Labels per Pod"
default: 3
type: number
delete_labels:
description: "Delete Labels"
default: true
type: boolean

workflow_call:
inputs:
resource_group:
description: "Azure Resource Group"
required: true
type: string
cluster_name:
description: "AKS Cluster Name"
required: true
type: string
location:
description: "Azure Location"
type: string
default: ${{ vars.AZURE_LOCATION }}
num_deployments:
description: "Number of Traffic Deployments"
default: 1000
type: number
num_replicas:
description: "Number of Traffic Replicas per Deployment"
default: 40
type: number
num_netpol:
description: "Number of Network Policies"
default: 1000
type: number
num_unique_labels_per_pod:
description: "Number of Unique Labels per Pod"
default: 2
type: number
num_unique_labels_per_deployment:
description: "Number of Unique Labels per Deployment"
default: 2
type: number
num_shared_labels_per_pod:
description: "Number of Shared Labels per Pod"
default: 3
type: number
delete_labels:
description: "Delete Labels"
default: true
type: boolean

permissions:
contents: read
id-token: write

jobs:
scale-test:
name: Scale Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go version

- name: Az CLI login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION }}

- name: Run Scale Test
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION }}
AZURE_LOCATION: ${{ input.location }}
AZURE_RESOURCE_GROUP: ${{ inputs.resource_group }}
CLUSTER_NAME: ${{ inputs.cluster_name }}
NUM_DEPLOYMENTS: ${{ inputs.num_deployments }}
NUM_REPLICAS: ${{ inputs.num_replicas }}
NUM_NETPOLS: ${{ inputs.num_netpol }}
NUM_UNIQUE_LABELS_PER_POD: ${{ inputs.num_unique_labels_per_pod }}
NUM_SHARED_LABELS_PER_POD: ${{ inputs.num_shared_labels_per_pod }}
NUM_UNIQUE_LABELS_PER_DEPLOYMENT: ${{ inputs.num_unique_labels_per_deployment }}
DELETE_LABELS: ${{ inputs.delete_labels }}
shell: bash
run: |
set -euo pipefail
go test -v ./test/e2e/. -timeout 300m -tags=scale -count=1 -args -image-tag=$(make version) -image-registry=${{vars.ACR_NAME}} -image-namespace=${{github.repository}}

0 comments on commit 2becd2c

Please sign in to comment.