thanks for your work on this topic. YouTube videos were awesome! documentation is neat.
followed the instructions and implemented in a sandbox environment. Looks like it is unable to auto scale runners when the workflow is triggered.
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: azure-runners
namespace: default
spec:
replicas: 0
template:
spec:
organization: myOrg
labels:
- ephemeral-aks-gharunner-vanilla
env:
- name: RUNNER_FEATURE_FLAG_EPHEMERAL
value: "true"
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
metadata:
name: azure-runners-deployment-autoscaler
namespace: default
spec:
scaleTargetRef:
name: azure-runners
minReplicas: 0
maxReplicas: 5
scaleUpTriggers:
- githubEvent: {}
duration: "5m"
name: Matrix jobs
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
matrix:
strategy:
matrix:
node: [1, 2, 3, 4, 5, 6, 7]
# The type of runner that the job will run on
runs-on: ['ephemeral-aks-gharunner-vanilla']
steps:
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo ${{ matrix.node }}
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
sleep 20
echo test, and deploy your project.
If I configure minReplicas:7 (or any number other than 0, but less than or equal to maxReplicas), jobs are triggered in parallel and finishes eventually. However, if I keep minReplicas:0, runners are not created and workflow jobs are in queue indefinitely. Any idea where I am going wrong?