-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Add support for binding style env vars #199
Conversation
/fyi @spadgett |
@bparees thoughts on shifting to this approach to accommodate binding |
as long as it matches what the mongo db template exposes as binding params (which it appears to), it lgtm. someone still has to take the secret created by the binding and turn it into env vars for this pod, for things to work, right? |
} else if (process.env.database_name) { | ||
mongoDatabase = process.env.database_name; | ||
mongoPassword = process.env.password; | ||
mongoUser = process.env.username; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should these be database_password and database_name ? (i assume the name can be anything we want since it depends on what the user defines the env in the pod as, based on the secret)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, these are the exact name that the template service broker is sending back. It has to be env.database_name and env.password (unless there is some manual mapping involved).
This allows for me to just bind and turn into env vars without getting involved (mapping anything).
mongoDatabase = process.env.database_name; | ||
mongoPassword = process.env.password; | ||
mongoUser = process.env.username; | ||
var mongoUriParts = process.env.uri && process.env.uri.split("//"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and database_uri
or mongo_uri
discussed the naming offline, i understand why it should stay as it is. lgtm. @hhorak ptal |
Changes tested manually, merging. |
No description provided.