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

make index.json relocatable #104

Open
jkirkham-ratehub opened this issue Mar 16, 2021 · 0 comments
Open

make index.json relocatable #104

jkirkham-ratehub opened this issue Mar 16, 2021 · 0 comments

Comments

@jkirkham-ratehub
Copy link

Summary

A common best practice is a separate application configurations from the application itself. Currently the Docker image assumes the index.json will be in the /opt/arena/ directory along side the application itself.
This can present some issues when deploying the container to kubernetes since some types of Volume mappings will overwrite the target directory and not just the file itself.

Work-Arounds

In kubernetes you can mount a Secret or ConfigMap key as a file and overwrite the file itself.
This may work in many cases, but because the index.json will likely contain secrets we are using Vault to inject secrets into a templated index.json, then mount that. This is most easily done when the file can be manipulated elsewhere (with side-car containers) and then referenced by Arena. Another possible work-around is to make the /opt/arena and default index.json file writable within the container -- though this is not optimal for container security.

Preferred Solution

Have the Arena container load the index.json from any specified path.
This is a trivial change and can be backwards compatible.
I have a fork of the repo with the fix (load the file path from an environment variable): jkirkham-ratehub@3e56be2
Let me know if you want a PR for this change.

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

No branches or pull requests

1 participant