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

config: environment variable name clash breaks config #68

Open
diegodelemos opened this issue May 19, 2020 · 0 comments
Open

config: environment variable name clash breaks config #68

diegodelemos opened this issue May 19, 2020 · 0 comments
Labels
type/bug Something isn't working
Projects

Comments

@diegodelemos
Copy link
Member

diegodelemos commented May 19, 2020

Stemmed from reanahub/reana#309 (comment)

Problem

A collision between REANA-DB configuration variable for DB port and naming for service discovery through environment variables in Kubernetes.

Example

With an example: If we don't set the REANA_DB_PORT environment variable, Kubernetes will set it as a Docker link (see more here) because (by default) there is a service called reana-db and using the Docker link naming scheme an env variable REANA_DB_PORT is created:

$ env | grep -i reana_db_port=
REANA_DB_PORT=tcp://10.102.63.67:5432

Possible solution

Disable service discovery through environment variables (see kubernetes/kubernetes#60099), remove all our dependencies on it and rely uniquely on DNS service discovery (security advantage, as we don't expose all services in user jobs).

Some occurrences of service discovery through environment variables in REANA:

$ rg SERVICE_HOST
reana-commons/reana_commons/config.py
93:                '{}_WORKFLOW_CONTROLLER_SERVICE_HOST'.format(

reana-workflow-controller/reana_workflow_controller/workflow_run_manager.py
391:                'name': 'REANA_JOB_CONTROLLER_SERVICE_HOST',
$ rg SERVICE_PORT
reana-commons/reana_commons/config.py
97:                '{}_WORKFLOW_CONTROLLER_SERVICE_PORT_HTTP'.format(

reana-workflow-controller/reana_workflow_controller/workflow_run_manager.py
386:                'name': 'REANA_JOB_CONTROLLER_SERVICE_PORT_HTTP',
@diegodelemos diegodelemos added the type/bug Something isn't working label May 19, 2020
@diegodelemos diegodelemos added this to Cluster next in Triage May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
Triage
Cluster next
Development

No branches or pull requests

1 participant