@@ -422,23 +422,23 @@ First, you define the type and metadata of the scale rule.
422
422
423
423
1. In the Bicep template, add all metadata values to the `custom.metadata` section of the scale rule.
424
424
425
- ` ` ` yml
426
- ...
427
- rules: [
428
- {
429
- name: 'azure-servicebus-queue-rule'
430
- custom: {
431
- type: 'azure-servicebus'
432
- metadata: {
433
- queueName: 'my-queue' ⬅️
434
- namespace: 'service-bus-namespace' ⬅️
435
- messageCount: '5' ⬅️
425
+ ` ` ` yml
426
+ ...
427
+ rules: [
428
+ {
429
+ name: 'azure-servicebus-queue-rule'
430
+ custom: {
431
+ type: 'azure-servicebus'
432
+ metadata: {
433
+ queueName: 'my-queue' ⬅️
434
+ namespace: 'service-bus-namespace' ⬅️
435
+ messageCount: '5' ⬅️
436
+ }
437
+ }
436
438
}
437
- }
438
- }
439
- ]
440
- ...
441
- ` ` `
439
+ ]
440
+ ...
441
+ ` ` `
442
442
443
443
# ## Authentication
444
444
@@ -502,49 +502,49 @@ KEDA scalers can use secrets in a [TriggerAuthentication](https://keda.sh/docs/l
502
502
503
503
1. Set the value of the `secretRef` property to the name of the `secretTargetRef`'s `key` property.
504
504
505
- ` ` ` bicep
506
- resource symbolicname 'Microsoft.App/containerApps@2025-02-02-preview' = {
507
- ...
508
- properties: {
509
- ...
510
- configuration: {
511
- ...
512
- secrets: [
513
- { ⬅️
514
- name: 'connection-string-secret' ⬅️
515
- value: '<SERVICE_BUS_CONNECTION_STRING>' ⬅️
516
- } ⬅️
517
- ]
518
- }
519
- template: {
520
- ...
521
- scale: {
522
- maxReplicas: 0
523
- minReplicas: 5
524
- rules: [
525
- {
526
- name: 'azure-servicebus-queue-rule'
527
- custom: {
528
- type: 'azure-servicebus'
529
- metadata: {
530
- queueName: 'my-queue'
531
- namespace: 'service-bus-namespace'
532
- messageCount: '5'
533
- }
534
- auth: [
535
- {
536
- secretRef: 'connection-string-secret'
537
- triggerParameter: 'connection'
538
- }
505
+ ` ` ` bicep
506
+ resource symbolicname 'Microsoft.App/containerApps@2025-02-02-preview' = {
507
+ ...
508
+ properties: {
509
+ ...
510
+ configuration: {
511
+ ...
512
+ secrets: [
513
+ { ⬅️
514
+ name: 'connection-string-secret' ⬅️
515
+ value: '<SERVICE_BUS_CONNECTION_STRING>' ⬅️
516
+ } ⬅️
539
517
]
540
518
}
519
+ template: {
520
+ ...
521
+ scale: {
522
+ maxReplicas: 0
523
+ minReplicas: 5
524
+ rules: [
525
+ {
526
+ name: 'azure-servicebus-queue-rule'
527
+ custom: {
528
+ type: 'azure-servicebus'
529
+ metadata: {
530
+ queueName: 'my-queue'
531
+ namespace: 'service-bus-namespace'
532
+ messageCount: '5'
533
+ }
534
+ auth: [
535
+ {
536
+ secretRef: 'connection-string-secret'
537
+ triggerParameter: 'connection'
538
+ }
539
+ ]
540
+ }
541
+ }
542
+ ]
543
+ }
544
+ }
541
545
}
542
- ]
543
- }
544
- }
545
- }
546
- }
547
- ` ` `
546
+ }
547
+ ` ` `
548
548
549
549
Some scalers support metadata with the `FromEnv` suffix to reference a value in an environment variable. Container Apps looks at the first container listed in the ARM template for the environment variable.
550
550
0 commit comments