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

ability to override backend endpoint from the configuration #248

Merged
merged 3 commits into from
Feb 6, 2017

Conversation

mikz
Copy link
Contributor

@mikz mikz commented Feb 6, 2017

sometimes the configuration can point to internal service that is not accessible from outside
for that we would like to have the ability to override backend endpoint with some env variable

the new variable name is BACKEND_ENDPOINT_OVERRIDE and expects an url like http://backend.example.com.

mikz added 2 commits February 6, 2017 10:05
useful when deploying outside openshift cluster
and want to use external Route over internal Service
parameter description should be nested in the list item
so the entrypoint test does not show any errors

When `THREESCALE_PORTAL_ENDPOINT` environment variable is provided, the gateway will download the configuration from 3scale on initializing. The configuration includes all the settings provided on the Integration page of the API(s).

It is **required** to provide either `THREESCALE_PORTAL_ENDPOINT` or `THREESCALE_CONFIG_FILE` (takes precedence) for the gateway to run successfully.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's becoming a bit chaotic in the overriding department. THREESCALE_CONFIG_FILE takes presedence over THREESCALE_PORTAL_ENDPOINT. BACKEND_ENDPOINT_OVERRIDE overrides backend endpoint from ENV

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well they are two unrelated things. Loading config has own order: file, v2 api, v1 api .
And this just overrides backend endpoint of any configuration loaded.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And later this will be refactored into one configuration option that will accept urls like:

@mikz mikz requested a review from vramosp February 6, 2017 10:56
@mayorova
Copy link
Contributor

mayorova commented Feb 6, 2017

Looks good to me (and works).

@mikz mikz merged commit 216bd26 into master Feb 6, 2017
@mikz mikz deleted the force-backend branch February 6, 2017 11:35
mikz added a commit that referenced this pull request Feb 6, 2017
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

Successfully merging this pull request may close these issues.

4 participants