Open kjlimxxxx opened 15 hours ago
This isn't a runtime issue. It's a Functions issue.
But I can tell you that after having dealt with this ourselves that it is expected behavior. The isolated worker is still executed by the functions hosting runtime, which knows nothing about the app settings you add to the isolated worker project. In order to work, the value needs to be in an enviroment variable for example otherwise the functions runtime won't see it, and it's that which still processes the bindings. We hit the same issue and that's what we had to fallback on.
Once you mount the csi volume, there's options to auto create Secrets from the content of the volume, which you can then add to the container enviroment variables. It makes it a bit wonky to work with, which is why we stopped using the csi driver. It was better in our case to just use Secret
s directly (which was easier via a tool like external-secrets
)
Description
I have a function triggered by Service Bus connection strings. There is an issue isolated worker process: the connection string stored in container secret storage are not resolved during function discovery, causing the function to fail.
Reproduction Steps
C:\mnt\secrets-store\
with a file namedServiceBusConnection
.local.settings.json
file.Update the
Program.cs
to load the secret:Ensure the function uses the connection string:
Expected behavior
The function should start with the resolved connection string.
Actual behavior
Error Message: When the app starts, the following error occurs:
The listener for function 'Functions.ServiceBus' was unable to start. Microsoft.Azure.WebJobs.Extensions.ServiceBus: Service Bus account connection string with name 'ServiceBusConnection' does not exist in the settings. Make sure that it is a defined App Setting.
Regression?
NA
Known Workarounds
NA
Configuration
Which version of .NET is the code running on? .NET 8
What OS and version, and what distro if applicable?
Other information