Storage service helm chart integration + bugfixes (#315)

Add storage service and a persistent volume claim to helm charts. A few bugfixes for the api proxy.
This commit is contained in:
Soam Vasani
2017-09-08 04:49:14 -07:00
committed by GitHub
parent 6142ac3648
commit 45c766061a
12 changed files with 181 additions and 9 deletions
+9 -2
View File
@@ -25,7 +25,7 @@ import (
)
func (api *API) StorageServiceProxy(w http.ResponseWriter, r *http.Request) {
u := api.storageServiceUrl + "/v1/archive"
u := api.storageServiceUrl
ssUrl, err := url.Parse(u)
if err != nil {
msg := fmt.Sprintf("Error parsing url %v: %v", u, err)
@@ -33,6 +33,13 @@ func (api *API) StorageServiceProxy(w http.ResponseWriter, r *http.Request) {
http.Error(w, msg, 500)
return
}
proxy := httputil.NewSingleHostReverseProxy(ssUrl)
director := func(req *http.Request) {
req.URL.Scheme = ssUrl.Scheme
req.URL.Host = ssUrl.Host
req.URL.Path = "/v1/archive"
}
proxy := &httputil.ReverseProxy{
Director: director,
}
proxy.ServeHTTP(w, r)
}