From 77196403dc2484329c469d591ff4ae74d1c63933 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Wed, 1 Oct 2014 12:40:28 -0700 Subject: [PATCH] Add support for fields. --- pkg/kubecfg/proxy_server.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/kubecfg/proxy_server.go b/pkg/kubecfg/proxy_server.go index 327555e7c34..068a1d58588 100644 --- a/pkg/kubecfg/proxy_server.go +++ b/pkg/kubecfg/proxy_server.go @@ -63,7 +63,14 @@ func (s *ProxyServer) doError(w http.ResponseWriter, err error) { func (s *ProxyServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { url := r.URL selector := url.Query().Get("labels") - result := s.Client.Verb(r.Method).AbsPath(r.URL.Path).ParseSelectorParam("labels", selector).Body(r.Body).Do() + fieldSelector := url.Query().Get("fields") + result := s.Client. + Verb(r.Method). + AbsPath(r.URL.Path). + ParseSelectorParam("labels", selector). + ParseSelectorParam("fields", fieldSelector). + Body(r.Body). + Do() if result.Error() != nil { s.doError(w, result.Error()) return