I have an azure function that i want to deploy to kubernetes. I'm trying to set up it's environment variables and link them to a keyvault, which https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings implies i can do by setting AzureWebJobsSecretStorageType to keyvault.
in order to do this, i'm editing the helm chart of my function to look like below:
...
spec:
containers:
- env:
- name: ApplicationInsights__InstrumentationKey
value: <appinsightsid>
- name: AzureWebJobsSecretStorageType
value: keyvault
- name: AzureWebJobsSecretStorageKeyVaultClientId
value: <managedidentity with kv permissions id>
- name: AzureWebJobsSecretStorageKeyVaultUri
value: <keyvault uri>
- name: AzureWebJobsStorage
value: '@Microsoft.KeyVault(SecretUri=<secreturi>)'
- name: envVar1
value: '@Microsoft.KeyVault(SecretUri=<secreturi>)'
- name: envVar2
value: '@Microsoft.KeyVault(SecretUri=<secreturi>)'
...
this doesn't work at all, and i'm guessing it's how I'm using @Microsoft.KeyVault and how it might not be formatted correctly for helm, or if i need to install something on kubernetes, or something else that i'm missing. The error i'm getting is basically:
A host error has occurred during startup operation 'abbdb89e-3c29-46bd-81fa-d80699bb4b70'. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: No valid combination of account information found. at Azure.Storage.StorageConnectionString.<>c.b__67_0(String err) at Azure.Storage.StorageConnectionString.ParseCore(String connectionString, StorageConnectionString& accountInformation, Action`1 error) at Azure.Storage.StorageConnectionString.Parse(String connectionString) at Azure.Storage.Blobs.BlobServiceClient..ctor(String connectionString, BlobClientOptions options)
any help would be appreciated!