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

🌟feat: internal API proxy #20

Merged
merged 2 commits into from
May 10, 2021
Merged

🌟feat: internal API proxy #20

merged 2 commits into from
May 10, 2021

Conversation

nandiheath
Copy link
Member

solving this

We had the deployed dashboard connecting to the kinto-core API through the public network. (e.g. https://core.kinto.somedomain.com)
But for the case if we want to do port-forwarding, we have to forward both dashboard and the core

Here the idea is to do a reverse proxy inside the dashboard container, which forwards the connection to core through internal k8s connection (i.e. pod to pod connection via http://kinto-core:8090), and expose the proxy via /api/*

So if we do port-forwarding, we can expose only the dashboard and without any modifications to any env vars as we always connect to /api

@nandiheath nandiheath requested a review from a team April 11, 2021 16:16
Copy link
Member

@bakayolo bakayolo left a comment

Choose a reason for hiding this comment

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

LGTM


location /api {
rewrite /api/(.*) /$1 break;
proxy_pass http://kinto-core:8090;
Copy link
Member

Choose a reason for hiding this comment

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

Can it be an env var?

@nandiheath nandiheath merged commit 25e0d3b into main May 10, 2021
@nandiheath nandiheath deleted the feat/proxy-api branch May 10, 2021 13:55
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.

2 participants