You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Container Apps中KEDA Event Hub工作负载身份配置问询

Azure Container Apps配置Event Hub KEDA缩放器的工作负载身份认证问题

我正尝试为Azure Container App配置基于Event Hub KEDA缩放器的自动缩放功能,应用需通过用户托管身份向Azure Event Hub进行身份验证。已知KEDA支持Azure工作负载身份,但配置时遇到困难,尤其是缩放规则中identityId参数的设置。

查阅相关资料后发现,Azure支持此类场景的Pod身份和工作负载身份,但针对Azure Container Apps的详细示例十分匮乏。

尝试的Bicep模板片段

resource app 'Microsoft.App/containerApps@2022-03-01' = {
  identity: {
    type: 'UserAssigned'
    userAssignedIdentities: {
      '${managedIdentity.id}': {}
    }
  }
  properties: {
    // 省略部分内容...
    template: {
      // 省略部分内容...
      scale: {
        rules: [
          {
            name: 'eh-keda-scale',
            custom: {
              type: 'azure-eventhub'
              metadata: {
                consumerGroup: containerAppName,
                unprocessedEventThreshold: '64',
                // 根据Keda event-hub文档可能需要配置?
                eventHubNamespace: eventHubNamespace,
                eventHubName: eventHubName,
                // 尝试配置工作负载身份
                // 不确定如何正确指定`identityId`
              },
              auth: [
                {
                  secretRef: 'clientIdentitySecret',
                  triggerParameter: 'identityId'
                  // 工作负载身份的`identityId`应如何配置?
                }
              ]
            }
          }
        ]
      }
    }
  }
}

已参考的资料

  • KEDA官方Event Hub缩放器文档
  • KEDA.NET Worker服务总线队列示例项目
  • Azure Container Apps缩放配置文档
  • Azure Container Apps的Bicep资源类型参考文档

遗憾的是,这些资料均未明确说明工作负载身份的配置细节,尤其是identityId参数的配置方式和位置。


内容的提问来源于stack exchange,提问作者Aaron Newton

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.26 08:55:21