Skip to content

Commit e556c44

Browse files
authored
Merge pull request #292666 from ggailey777/aca-updates
[Functions][ACA] managed identity and other fixes
2 parents f28d900 + 27b9122 commit e556c44

File tree

4 files changed

+110
-87
lines changed

4 files changed

+110
-87
lines changed

articles/azure-functions/functions-container-apps-hosting.md

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Azure Container Apps hosting of Azure Functions
33
description: Learn about how you can use Azure Functions on Azure Container Apps to host and manage containerized function apps in Azure.
4-
ms.date: 12/25/2024
4+
ms.date: 01/05/2025
55
ms.topic: conceptual
66
ms.custom: build-2024, linux-related-content
77
# Customer intent: As a cloud developer, I want to learn more about hosting my function apps in Linux containers managed by Azure Container Apps.
@@ -58,11 +58,40 @@ Azure Functions currently supports the following methods of deploying a containe
5858
+ [GitHub Actions](https://github.com/Azure/azure-functions-on-container-apps/tree/main/samples/GitHubActions)
5959
+ [Visual Studio Code](https://github.com/Azure/azure-functions-on-container-apps/tree/main/samples/VSCode%20Sample)
6060

61+
You can continuously deploy your containerized apps from source code using either [Azure Pipelines](functions-how-to-azure-devops.md?pivots=v1#deploy-a-container) or [GitHub Actions](https://github.com/Azure/azure-functions-on-container-apps/tree/main/samples/GitHubActions). The continuous deployment feature of Functions isn't currently supported when deploying to Container Apps.
62+
63+
## Managed identity authorization
64+
65+
For the best security, you should connect to remote services using Microsoft Entra authentication and managed identity authorization. You can use managed identities for these connections:
66+
67+
+ [Default storage account (`AzureWebJobsStorage`)](./functions-reference.md#connections)
68+
+ [Azure Container Registry](functions-deploy-container-apps.md?tabs=acr#create-and-configure-a-function-app-on-azure-with-the-image)
69+
70+
When running in Container Apps, you can use Microsoft Entra ID with managed identities for all binding extensions that support managed identities. Currently, only these binding extensions support event-driven scaling when using managed identity authentication:
71+
72+
+ Azure Event Hubs
73+
+ Azure Queue Storage
74+
+ Azure Service Bus
75+
76+
For other bindings, use fixed replicas when using managed identity authentication. For more information, see the [Functions developer guide](./functions-reference.md#connections).
77+
6178
## Virtual network integration
6279

6380
When you host your function apps in a Container Apps environment, your functions are able to take advantage of both internally and externally accessible virtual networks. To learn more about environment networks, see [Networking in Azure Container Apps environment](../container-apps/networking.md).
6481

65-
## Configure scale rules
82+
## Event-driven scaling
83+
84+
All Functions triggers can be used in your containerized function app. However, only these triggers can dynamically scale (from zero instances) based on received events when running in a Container Apps environment:
85+
86+
+ Azure Event Grid
87+
+ Azure Event Hubs
88+
+ Azure Blob Storage (event-based)
89+
+ Azure Queue Storage
90+
+ Azure Service Bus
91+
+ Durable Functions (MSSQL storage provider)
92+
+ HTTP
93+
+ Kafka
94+
+ Timer
6695

6796
Azure Functions on Container Apps is designed to configure the scale parameters and rules as per the event target. You don't need to worry about configuring the KEDA scaled objects. You can still set minimum and maximum replica count when creating or modifying your function app. The following Azure CLI command sets the minimum and maximum replica count when creating a new function app in a Container Apps environment from an Azure Container Registry:
6897

@@ -86,33 +115,31 @@ A managed resource group gets removed automatically after all function app conta
86115

87116
If you run into any issues with these managed resource groups, you should contact support.
88117

118+
## Application logging
119+
120+
You can monitor your containerized function app hosted in Container Apps using Azure Monitor Application Insights in the same way you do with apps hosted by Azure Functions. For more information, see [Monitor Azure Functions](./monitor-functions.md).
121+
122+
For bindings that support event-driven scaling, scale events are logged as `FunctionsScalerInfo` and `FunctionsScalerError` events in your Log Analytics workspace. For more information, see [Application Logging in Azure Container Apps](../container-apps/logging.md).
123+
89124
## Considerations for Container Apps hosting
90125

91126
Keep in mind the following considerations when deploying your function app containers to Container Apps:
92127

93-
+ While all triggers can be used, only the following triggers can dynamically scale (from zero instances) when running in a Container Apps environment:
94-
+ Azure Event Grid
95-
+ Azure Event Hubs
96-
+ Azure Blob storage (event-based)
97-
+ Azure Queue Storage
98-
+ Azure Service Bus
99-
+ Durable Functions (MSSQL storage provider)
100-
+ HTTP
101-
+ Kafka
102-
+ Timer
103128
+ These limitations apply to Kafka triggers:
104129
+ The protocol value of `ssl` isn't supported when hosted on Container Apps. Use a [different protocol value](functions-bindings-kafka-trigger.md?pivots=programming-language-csharp#attributes).
105-
+ For a Kafka trigger to dynamically scale when connected to Event Hubs, the `username` property must resolve to an application setting that contains the actual username value. When the default `$ConnectionString` value is used, the Kafka trigger won't be able to cause the app to scale dynamically.
130+
+ For a Kafka trigger to dynamically scale when connected to Event Hubs, the `username` property must resolve to an application setting that contains the actual username value. When the default `$ConnectionString` value is used, the Kafka trigger isn't able to cause the app to scale dynamically.
106131
+ For the built-in Container Apps [policy definitions](../container-apps/policy-reference.md#policy-definitions), currently only environment-level policies apply to Azure Functions containers.
107132
+ You can use managed identities for these connections:
108133
+ [Deployment from an Azure Container Registry](functions-deploy-container-apps.md?tabs=acr#create-and-configure-a-function-app-on-azure-with-the-image)
109134
+ [Triggers and bindings](functions-reference.md#configure-an-identity-based-connection)
110135
+ [Required host storage connection](functions-identity-based-connections-tutorial.md)
136+
+ By default, a containerized function app monitors port 80 for incoming requests. If your app must use a different port, use the [`WEBSITES_PORT` application setting](../app-service/reference-app-settings.md#custom-containers) to change this default port.
137+
+ You aren't currently able to use built-in continuous deployment features when hosting on Container Apps. You must instead deploy from source code using either [Azure Pipelines](functions-how-to-azure-devops.md?pivots=v1#deploy-a-container) or [GitHub Actions](https://github.com/Azure/azure-functions-on-container-apps/tree/main/samples/GitHubActions).
111138
+ You currently can't move a Container Apps hosted function app deployment between resource groups or between subscriptions. Instead, you would have to recreate the existing containerized app deployment in a new resource group, subscription, or region.
112139
+ When using Container Apps, you don't have direct access to the lower-level Kubernetes APIs.
113140
+ The `containerapp` extension conflicts with the `appservice-kube` extension in Azure CLI. If you have previously published apps to Azure Arc, run `az extension list` and make sure that `appservice-kube` isn't installed. If it is, you can remove it by running `az extension remove -n appservice-kube`.
114141

115-
## Next steps
142+
## Related articles
116143

117144
+ [Hosting and scale](./functions-scale.md)
118145
+ [Create your first containerized functions on Container Apps](./functions-deploy-container-apps.md)

0 commit comments

Comments
 (0)