You are configuring a canary deployment for an Azure Container App named `web-shop`. The application is configured to run multiple active revisions. You have deployed a new revision named `web-shop--v2`, and the existing revision is named `web-shop--v1`.
You need to configure the HTTP ingress of the Container App to route of the incoming traffic to `web-shop--v1` and the remaining to `web-shop--v2`.
Which configuration block should you include under the `properties.configuration.ingress` section of the Container App Bicep template?
- traffic: [
{
revisionName: 'web-shop--v1'
weight: 80
}
{
revisionName: 'web-shop--v2'
weight: 20
}
]Cevap - Btraffic: [
{
revision: 'web-shop--v1'
percent: 80
}
{
revision: 'web-shop--v2'
percent: 20
}
] - Ctraffic: [
{
revisionName: 'web-shop--v1'
weight: '80%'
}
{
revisionName: 'web-shop--v2'
weight: '20%'
}
] - Didentity: {
type: 'SystemAssigned'
}
traffic: [
{
revisionName: 'web-shop--v1'
weight: 80
}
{
revisionName: 'web-shop--v2'
weight: 20
}
]
Cevap
The correct block must define the 'traffic' array with objects specifying 'revisionName' as 'web-shop--v1' and 'web-shop--v2', and 'weight' as the integers 80 and 20 respectively.
The correct configuration uses the 'traffic' block under 'properties.configuration.ingress'. In this block, you specify the active revisions using the 'revisionName' property and allocate the traffic share as an integer percentage using the 'weight' property. This allows the Container App to balance traffic according to the specified weights.
Adım Adım Çözüm
Anahtar Kavram
Configuring traffic splitting for multiple revisions in Azure Container Apps ingress.