Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

feat(chart): proxy to the API #187

Merged
merged 2 commits into from
Jul 13, 2018

Conversation

technosophos
Copy link
Contributor

This feat adds two things:

  1. It exposes the nginx config file via a config map. This is useful for tweaking the way Kashti gets served (and could be used for adding auth)
  2. It proxies the API calls (anything to /v1/ into the Brigade API server, thus eliminating the need to expose the API server publicly

To test:

Install:

$ helm install -n kashti charts/kashti --set brigade.apiServer="http://brigade-brigade-api.default.svc.cluster.local:7745"

(where the apiServer URL is the in-cluster domain name or IP address to your brigade API server)

Run brig proxy and open the URL in your browser. It should load the full dashboard.

In your browswer's developer tools, load the network view. Then reload the page. You should see the API calls go over localhost:8081/v1 instead of directly against the API server.

Copy link
Contributor

@radu-matei radu-matei left a comment

Choose a reason for hiding this comment

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

Manually tested, all API requests are proxied to v1

@radu-matei
Copy link
Contributor

This can also be tested by manually starting the port forward only to the Kashti pod, then making requests to /v1:

$ kubectl port-forward <kashti-pod> 8081:80

$ curl localhost:8081/v1/projects-build
<response from API>

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.

None yet

4 participants