diff --git a/.github/workflows/test-autoscaling.yml b/.github/workflows/test-autoscaling.yml new file mode 100644 index 0000000..31c85f1 --- /dev/null +++ b/.github/workflows/test-autoscaling.yml @@ -0,0 +1,19 @@ +name: Test Autoscaling + +on: + workflow_dispatch: + +jobs: + load-test: + runs-on: self-hosted # matches ARC runners + strategy: + matrix: + job_id: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] + fail-fast: false + + steps: + - name: Print job info + run: echo "Running job ${{ matrix.job_id }}" + + - name: Simulate work load + run: sleep 60 \ No newline at end of file diff --git a/github_runner/install/autoscale.yaml b/github_runner/install/autoscale.yaml new file mode 100644 index 0000000..b725165 --- /dev/null +++ b/github_runner/install/autoscale.yaml @@ -0,0 +1,14 @@ +apiVersion: actions.summerwind.dev/v1alpha1 +kind: HorizontalRunnerAutoscaler +metadata: + name: mealcraft-org-autoscaler +spec: + scaleTargetRef: + name: mealcraft-org-runners + minReplicas: 1 + maxReplicas: 20 # adjust based on your server size + metrics: + - type: TotalNumberOfQueuedAndInProgressWorkflowRuns + # This applies to ALL MealCraft repos + repositoryNames: + - "MealCraft/*" \ No newline at end of file diff --git a/github_runner/install/runnerset.yaml b/github_runner/install/runnerset.yaml index 4ebb358..522c42b 100644 --- a/github_runner/install/runnerset.yaml +++ b/github_runner/install/runnerset.yaml @@ -12,16 +12,3 @@ spec: - mealcraft-org - arc - microk8s -# apiVersion: actions.summerwind.dev/v1alpha1 -# kind: HorizontalRunnerAutoscaler -# metadata: -# name: mealcraft-org-autoscaler -# spec: -# scaleTargetRef: -# name: mealcraft-org-runners -# minReplicas: 1 -# maxReplicas: 20 # adjust based on your server size -# metrics: -# - type: TotalNumberOfQueuedAndInProgressWorkflowRuns -# # This applies to ALL MealCraft repos -# organization: MealCraft \ No newline at end of file