Bugfix: Add env var for exp engine secret path #287
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
In PR #274, changes were made to the way experiment engine secrets were passed to the plugin manager of the experiment engine. One of these secrets is the Google service account token (stored in a json file), which gets mounted as a volume within a Turing Router deployment. The experiment engine plugin (run as a subprocess of the Turing Router and hence is run within the same container as it) is then supposed to access this file using a file path stored in an environment variable.
However, it is possible for the Turing Router and the experiment engine to have separate Google service accounts instead of the same one. Unfortunately, PR #274 has missed out specifying a file path to the service account token of the experiment engine. While the file path of the router's service account token remains stored in the env variable
GOOGLE_APPLICATION_CREDENTIALS
, there is a need to create another environment variable that points to the location of the experiment engine service account.This PR does just that and injects an additional environment variable
EXP_GOOGLE_APPLICATION_CREDENTIALS
for the said purpose.