Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read the identifier and access key from environment variables #14

Open
fjunqueira opened this issue Aug 10, 2018 · 2 comments
Open

Read the identifier and access key from environment variables #14

fjunqueira opened this issue Aug 10, 2018 · 2 comments

Comments

@fjunqueira
Copy link

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:

  • We have different clusters and bots for each of our environments
  • The identifier and access keys are different for each of those environments and bots
  • I wanted to store those identifiers and access keys as secrets in our k8s cluster and load them as environment variables
  • Since the application.json file is not loaded using the ConfigurationBuilder class in the console template, I cant use the technique shown here to replace those settings with the contents from my environment variables.

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
Copy link
Contributor

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
Copy link
Contributor

ceifa commented Feb 19, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants