简体   繁体   English

服务总线和 Function App(Vnet) 集成

[英]Servicebus and Function App(Vnet) integration

I am using Topic trigger for function app.我正在为 function 应用程序使用主题触发器。 I have my function app inside the Vnet but not the service bus.我在 Vnet 中有我的 function 应用程序,但没有服务总线。 I can see the messages are not getting triggered/received by the function.我可以看到消息没有被 function 触发/接收。 Does that mean that both service bus and Function app should be inside the Vnet or is there any other option I could Try.这是否意味着服务总线和 Function 应用程序都应该在 Vnet 内,或者我可以尝试任何其他选项。

If I move out of the Vnet in Function App, everything seems fine.如果我在 Function 应用程序中移出 Vnet,一切似乎都很好。 Any suggestions?有什么建议么?

As far as I know, VNet Integration gives your app access to resources in your VNet, but it doesn't grant inbound private access to your app from the VNet.据我所知,VNet 集成使您的应用程序可以访问您的 VNet 中的资源,但它不会授予您从 VNet 对您的应用程序的入站私有访问权限。 This will not impact your outbound traffic to your Azure service bus.这不会影响到 Azure 服务总线的出站流量。 You don't need to set WEBSITE_VNET_ROUTE_ALL=1 .您不需要设置WEBSITE_VNET_ROUTE_ALL=1

在此处输入图像描述

Verify that there is neither service endpoint enabled nor NSG rules blocking on the integrated subnet.确认集成子网上既没有启用服务端点也没有阻止 NSG 规则。 在此处输入图像描述

在此处输入图像描述

When using Regional VNet Integration, there are couple of things that needs to be in place to ensure the function app can connect with Key vault使用区域 VNet 集成时,需要采取一些措施来确保 function 应用可以与 Key Vault 连接

  • Keyvault service endpoint needs to be enabled on the integration subnet.需要在集成子网上启用 Keyvault 服务端点。
  • the integration subnet needs to be whitelisted on the Keyvault firewall.集成子网需要在 Keyvault 防火墙上列入白名单。 See this .看到这个

There is however a scenario that currently doesn't work because of architectural limitations.然而,由于架构限制,目前有一种方案无法运行。 See this: https://feedback.azure.com/forums/355860-azure-functions/suggestions/38817385-allow-key-vault-references-to-access-secrets-behin看到这个: https://feedback.azure.com/forums/355860-azure-functions/suggestions/38817385-allow-key-vault-references-to-access-secrets-behin

If the KeyVault endpoint is being passed through app settings, then this scenario currently doesn't work.如果 KeyVault 端点正在通过应用程序设置传递,则此方案当前不起作用。 If your function code, access the key vault endpoint direcly, then that should probably work.如果您的 function 代码直接访问密钥保管库端点,那么这应该可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM