Skip to content

Conversation

@joshuasequeira19
Copy link
Member

Previously, the React app tried to call the API server directly from the browser using cluster-internal DNS (forkspacer-api-server:8080), which fails as browsers cannot resolve Kubernetes service DNS names.

This change implements server-side API proxying:

  • Browser calls relative paths (/api/v1/*)
  • Nginx in operator-ui pod proxies to api-server internally
  • API requests never leave the cluster from the browser

Changes:

  • Add nginx.conf.template with proxy configuration
  • Add docker-entrypoint.sh to inject API_SERVER_URL at runtime
  • Update Dockerfile to use custom nginx config and entrypoint
  • Update Helm values to use API_SERVER_URL for nginx proxying
  • Update deployment template to pass API_SERVER_URL to container

Previously, the React app tried to call the API server directly from
the browser using cluster-internal DNS (forkspacer-api-server:8080),
which fails as browsers cannot resolve Kubernetes service DNS names.

This change implements server-side API proxying:
- Browser calls relative paths (/api/v1/*)
- Nginx in operator-ui pod proxies to api-server internally
- API requests never leave the cluster from the browser

Changes:
- Add nginx.conf.template with proxy configuration
- Add docker-entrypoint.sh to inject API_SERVER_URL at runtime
- Update Dockerfile to use custom nginx config and entrypoint
- Update Helm values to use API_SERVER_URL for nginx proxying
- Update deployment template to pass API_SERVER_URL to container
@joshuasequeira19 joshuasequeira19 merged commit 5fb77ac into main Oct 16, 2025
4 of 5 checks passed
@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2025
@joshuasequeira19 joshuasequeira19 deleted the feat/server-side-api-proxy branch October 16, 2025 18:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants