takenet / blip-sdk-csharp

The C# SDK for the blip.ai bot platform
https://blip.ai
Apache License 2.0
32 stars 41 forks source link

Read the identifier and access key from environment variables #14

Open fjunqueira opened 6 years ago

fjunqueira commented 6 years ago

When attempting to deploy a bot built with the BLiP SDK (using the console template) to a k8s cluster, I ran into the following problem:

What is the recommended way to proceed here? I saw that using the BlipClientBuilder directly would help me to work around this issue, but there is a bunch of configuration that is already done by the console template which i don't want to tinker with myself.

Are u guys accepting community PR's? Maybe adding a flag to the console template that makes it replace the identifier and accessKey loaded from the appsettings file with the contents of the BLIP_IDENTIFIER and BLIP_ACCESS_KEY environment variables would solve the issue.

Thank you for your time!

lfmundim commented 4 years ago

Hey @fjunqueira

First of all, community PR's are accepted and encouraged :) The maintainer team will happily review and comment on your PR, and possibly merge with master if everything is OK!

Regarding your issue, I'm not sure what problem you were experiencing. Could you provide repro-steps or maybe a repo? We have always used environment variables via CI providers by replacing the values within application.json

ceifa commented 4 years ago

Perhaps there is a better approach than forcing the use of application.json. A simple solution would be to expose the construction of the Application object in the template.