microsoft / azure-container-apps

Roadmap and issues for Azure Container Apps
MIT License
372 stars 29 forks source link

Azure Container App Job not scaling for custom labels using KEDA github-runner autoscaler #1348

Closed ckchessmaster closed 6 days ago

ckchessmaster commented 6 days ago

This issue is a: (mark with an x)

Issue description

We have tried setting up Github runners as a Container App Job using the github-runner KEDA scaler. After configuring KEDA & setting up the scale settings, we've noticed that the github runner will only scale using the default label self-hosted. When we try to tell the workflow to use a different label it just sits in queue forever and the container app job doesn't scale. We have set the labels field in the metadata and included the --labels parameter in the entrypoint of the docker image.

Steps to reproduce

  1. Setup Workload profiles container apps using the 'github-runner' KEDA scaler
  2. Setup autoscaling and set the labels metadata
  3. Setup the github actions to use the custom label
  4. Trigger the github action

Expected behavior The container app job should scale for the custom labels in addition to the default labels.

Actual behavior The container app job only scales for the default labels and will not scale at all if we request a custom label

Screenshots
KEDA Config: Image

Github action: Image

Entrypoint.sh call Image

ckchessmaster commented 6 days ago

I ended up figuring out the issue. It turns out there was an issue deploying the docker image that added the labels flag to the entrypoint. So KEDA was starting the container but the container wasn't started with the labels flag. After fixing the docker pipeline and re-deploying the new image everything is working as expected.