I have a question concerning the dapr config store component.
I’m trying to use the config store component in an Azure container app. I have it configured in a bicep file like so:
resource daprConfigComponent 'Microsoft.App/managedEnvironments/daprComponents@2022-11-01-preview' = {
name: 'configstore'
parent: environment
properties: {
componentType: 'configuration.azure.appconfig'
version: 'v1'
metadata: [
{
name: 'connectionString'
value: '<connection-string-here>'
}
]
scopes: [
'nativevoice'
]
}
}
It seems to be working fine and daprd gives no errors, however when I run my container app it gives the following error:
Grpc.Core.RpcException: Status(StatusCode="InvalidArgument", Detail="failed to subscribe [orderId1 orderId2] from Configuration store configstore: azure appconfig error: sentinel key is not provided in metadata")
It seems that dapr doesn’t work with Azure app configuration despite the fact I followed this documentation: https://docs.dapr.io/reference/components-reference/supported-configuration-stores/azure-appconfig-configuration-store/.
Anyone have any idea on how to fix this?
2
Answers
@Brett Boss answer resolved the issue, I had to add sentinelKey to the metadata. I use the .NET Dapr SDK so for me it looked like this:
If you are using
AddStreamingDaprConfigurationStore
then you’ll need to add metadata with a key of "sentinelKey" and a value of whatever configuration key you want to trigger a reload of configuration values.Example:
Source: https://github.com/dapr/components-contrib/blob/master/configuration/azure/appconfig/appconfig.go#L248