DATAGO-78232: Add new spring variable to override the use of user.home #189
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.
What is the purpose of this change?
When running the docker image in k8s, the user.home get's set to '?' which causes the EMA to fail to load
How was this change implemented?
Anywhere that we use user.home, we add another variable that can be set on the command line (or via an env var) that overrides the use of user.home, so the "command" and "tfcommand" directories get created as expected.
I was able to test this in docker using the following command:
The "magic" here is setting the environment variable
JAVA_OPTS
to be-Dapp.commandroot=/opt
. This overrides the use ofuser.home
. For the kubernetes deployment, we must add theJAVA_OPTS
env var via sidekick.How was this change tested?
Tested with jar from the command line and with docker container.
Tested with and without the new 'app.commandroot' variable set. With app.commandroot set, it as used as the root directory instead of the user's home directory.
Tested with config push and scan
Is there anything the reviewers should focus on/be aware of?
None