I’m trying to implement an Azure Container Apps Job environment with KEDA scaling enabled for Azure Pipelines. Ideally we want to enable Managed Identity for the authentication so that we can use the service password less. And we are pretty close to getting there, it works via the identity until we use the KEDA scaling implementation.
We’ve followed this page when creating the container app: [Microsoft Docs][1]
And this page for the docker part:
Medium guide
Down below you see a section which is mentioning the scale-rule-identity part, we’re using that in order to configure it. The whole identity that we’ve chosen has access to Azure DevOps so in theory it should be able to work. When i deploy a regular App Environment with a static agent, this whole process works just fine. My code is as follows:
az containerapp job create -n "manual-deploy-1" -g "RG" --environment "APPENV" --trigger-type Event --replica-timeout 7200 --replica-retry-limit 0 --replica-completion-count 1 --parallelism 1 --polling-interval 1 --image "ACR+IMAGE" --min-executions 0 --max-executions 10 --user-assigned "USER ASSIGNED MANAGED IDENTITY" --polling-interval 30 --scale-rule-name "azure-pipelines" --scale-rule-type "azure-pipelines" --scale-rule-metadata "poolName=AZUREDEVOPSPOOLNAME" "targetPipelinesQueueLength=1" --scale-rule-auth "organizationURL=organization-url" --scale-rule-identity "USER ASSIGNED MANAGED IDENTITY" --cpu "2.0" --memory "4Gi" --secrets "organization-url=ADOURL" --env-vars "AZP_URL=secretref:organization-url" "AZP_POOL=AZUREDEVOPSPOOLNAME" --registry-server "ACRLOGINSERVER"
This deploys the whole setup with success, afterwards we add the identity to ADO to complete the setup. But we do not see any jobs appearing in the Execution history tab. So I’m kind of lost to be honest.
EDIT:
When adding a System Assigned Identity to the App Container Job, on top of the UAMI, I saw some containers coming online (3 jobs were in the queue but only 2 came online) but they never went off line. Even when, according to the logs, the containers said that the job was successful. So there’s still something that is not working properly.