-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
I can't get autoscaling to work with the KEDA azure-pipelines scaler. Here's my bicep configuration.
resource container_app 'Microsoft.Web/containerApps@2021-03-01' = {
name: 'mycontainerapp'
location: 'eastus'
properties: {
kubeEnvironmentId: container_app_environment.id
configuration: {
activeRevisionsMode: 'single'
secrets: [
{
name: azure_devops_url_secret_name
value: azure_devops_url
}
{
name: azure_devops_pool_name_secret_name
value: azure_devops_pool_name
}
{
name: azure_devops_token_secret_name
value: azure_devops_token
}
{
name: container_registry_password_secret_name
value: container_registry.listCredentials().passwords[0].value
}
]
registries: [
{
server: container_registry.properties.loginServer
username: container_registry.listCredentials().username
passwordSecretRef: container_registry_password_secret_name
}
]
}
template: {
containers: [
{
image: '${container_registry.properties.loginServer}/repo:123'
name: 'mycontainerapp'
env: [
{
name: 'AZP_URL'
secretRef: azure_devops_url_secret_name
}
{
name: 'AZP_TOKEN'
secretRef: azure_devops_token_secret_name
}
{
name: 'AZP_POOL'
secretRef: azure_devops_pool_name_secret_name
}
]
}
]
scale: {
minReplicas: 1
maxReplicas: 10
rules: [
{
name: 'azure-pipelines'
custom: {
type: 'azure-pipelines'
metadata: {
poolId: azure_devops_pool_id
targetPipelinesQueueLength: '1'
}
auth: [
{
triggerParameter: 'organizationURL'
secretRef: azure_devops_url_secret_name
}
{
triggerParameter: 'personalAccessToken'
secretRef: azure_devops_token_secret_name
}
]
}
}
]
}
}
}
}
The container deploys successfully with 1 replica. However, it doesn't scale no matter how many jobs are waiting in the Azure Pipelines queue.
SebastianSchuetze
Metadata
Metadata
Assignees
Labels
No labels