From d1d10f8361bf2cfdf3f48059e6933c521b400e47 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 18:25:59 -0700 Subject: [PATCH 01/15] rename api to unversioned --- pkg/api/{ => unversioned}/unversioned.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename pkg/api/{ => unversioned}/unversioned.go (99%) diff --git a/pkg/api/unversioned.go b/pkg/api/unversioned/unversioned.go similarity index 99% rename from pkg/api/unversioned.go rename to pkg/api/unversioned/unversioned.go index 5e5d5844d3b..a885ecab23d 100644 --- a/pkg/api/unversioned.go +++ b/pkg/api/unversioned/unversioned.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package api +package unversioned import ( "strings" From 50a2c4c6438f80e12e8302edf6d0bd0d7f83770f Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 18:30:38 -0700 Subject: [PATCH 02/15] grep-sed --- pkg/apiserver/apiserver.go | 2 +- pkg/client/cache/listwatch_test.go | 4 ++-- pkg/client/unversioned/client.go | 6 +++--- pkg/client/unversioned/client_test.go | 8 ++++---- pkg/client/unversioned/events_test.go | 4 ++-- pkg/client/unversioned/experimental.go | 4 ++-- pkg/client/unversioned/helper_blackbox_test.go | 4 ++-- pkg/client/unversioned/nodes_test.go | 2 +- pkg/client/unversioned/pods_test.go | 2 +- pkg/client/unversioned/request.go | 4 ++-- pkg/client/unversioned/request_test.go | 4 ++-- pkg/client/unversioned/services_test.go | 2 +- pkg/client/unversioned/testclient/testclient.go | 4 ++-- pkg/kubectl/cmd/apiversions.go | 2 +- pkg/kubectl/cmd/delete_test.go | 4 ++-- pkg/kubectl/cmd/get_test.go | 4 ++-- pkg/kubectl/resource/builder_test.go | 6 +++--- pkg/kubectl/resource/helper_test.go | 2 +- test/e2e/kubectl.go | 4 ++-- 19 files changed, 36 insertions(+), 36 deletions(-) diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index 4314e0d1320..fa0b612bf10 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -307,7 +307,7 @@ func handleVersion(req *restful.Request, resp *restful.Response) { func APIVersionHandler(versions ...string) restful.RouteFunction { return func(req *restful.Request, resp *restful.Response) { // TODO: use restful's Response methods - writeRawJSON(http.StatusOK, api.APIVersions{Versions: versions}, resp.ResponseWriter) + writeRawJSON(http.StatusOK, unversioned.APIVersions{Versions: versions}, resp.ResponseWriter) } } diff --git a/pkg/client/cache/listwatch_test.go b/pkg/client/cache/listwatch_test.go index 4b31bce981d..c24fe2613c7 100644 --- a/pkg/client/cache/listwatch_test.go +++ b/pkg/client/cache/listwatch_test.go @@ -54,7 +54,7 @@ func buildLocation(resourcePath string, query url.Values) string { } func TestListWatchesCanList(t *testing.T) { - fieldSelectorQueryParamName := api.FieldSelectorQueryParam(testapi.Default.Version()) + fieldSelectorQueryParamName := unversioned.FieldSelectorQueryParam(testapi.Default.Version()) table := []struct { location string resource string @@ -104,7 +104,7 @@ func TestListWatchesCanList(t *testing.T) { } func TestListWatchesCanWatch(t *testing.T) { - fieldSelectorQueryParamName := api.FieldSelectorQueryParam(testapi.Default.Version()) + fieldSelectorQueryParamName := unversioned.FieldSelectorQueryParam(testapi.Default.Version()) table := []struct { rv string location string diff --git a/pkg/client/unversioned/client.go b/pkg/client/unversioned/client.go index c1b7139513f..71d82550f33 100644 --- a/pkg/client/unversioned/client.go +++ b/pkg/client/unversioned/client.go @@ -116,7 +116,7 @@ func (c *Client) ComponentStatuses() ComponentStatusInterface { // VersionInterface has a method to retrieve the server version. type VersionInterface interface { ServerVersion() (*version.Info, error) - ServerAPIVersions() (*api.APIVersions, error) + ServerAPIVersions() (*unversioned.APIVersions, error) } // APIStatus is exposed by errors that can be converted to an api.Status object @@ -146,12 +146,12 @@ func (c *Client) ServerVersion() (*version.Info, error) { } // ServerAPIVersions retrieves and parses the list of API versions the server supports. -func (c *Client) ServerAPIVersions() (*api.APIVersions, error) { +func (c *Client) ServerAPIVersions() (*unversioned.APIVersions, error) { body, err := c.Get().UnversionedPath("").Do().Raw() if err != nil { return nil, err } - var v api.APIVersions + var v unversioned.APIVersions err = json.Unmarshal(body, &v) if err != nil { return nil, fmt.Errorf("got '%s': %v", string(body), err) diff --git a/pkg/client/unversioned/client_test.go b/pkg/client/unversioned/client_test.go index 5eec4ffca8a..8c6d97d056a 100644 --- a/pkg/client/unversioned/client_test.go +++ b/pkg/client/unversioned/client_test.go @@ -149,9 +149,9 @@ func (c *testClient) ValidateCommon(t *testing.T, err error) { validator, ok := c.QueryValidator[key] if !ok { switch key { - case api.LabelSelectorQueryParam(testapi.Default.Version()): + case unversioned.LabelSelectorQueryParam(testapi.Default.Version()): validator = validateLabels - case api.FieldSelectorQueryParam(testapi.Default.Version()): + case unversioned.FieldSelectorQueryParam(testapi.Default.Version()): validator = validateFields default: validator = func(a, b string) bool { return a == b } @@ -272,7 +272,7 @@ func TestGetServerVersion(t *testing.T) { func TestGetServerAPIVersions(t *testing.T) { versions := []string{"v1", "v2", "v3"} - expect := api.APIVersions{Versions: versions} + expect := unversioned.APIVersions{Versions: versions} server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { output, err := json.Marshal(expect) if err != nil { @@ -300,7 +300,7 @@ func swaggerSchemaFakeServer() (*httptest.Server, error) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { var resp interface{} if request == 1 { - resp = api.APIVersions{Versions: []string{"v1", "v2", "v3"}} + resp = unversioned.APIVersions{Versions: []string{"v1", "v2", "v3"}} request++ } else { resp = swagger.ApiDeclaration{} diff --git a/pkg/client/unversioned/events_test.go b/pkg/client/unversioned/events_test.go index 33171e04db4..40ec6996374 100644 --- a/pkg/client/unversioned/events_test.go +++ b/pkg/client/unversioned/events_test.go @@ -34,12 +34,12 @@ func TestEventSearch(t *testing.T) { Method: "GET", Path: testapi.Default.ResourcePath("events", "baz", ""), Query: url.Values{ - api.FieldSelectorQueryParam(testapi.Default.Version()): []string{ + unversioned.FieldSelectorQueryParam(testapi.Default.Version()): []string{ getInvolvedObjectNameFieldLabel(testapi.Default.Version()) + "=foo,", "involvedObject.namespace=baz,", "involvedObject.kind=Pod", }, - api.LabelSelectorQueryParam(testapi.Default.Version()): []string{}, + unversioned.LabelSelectorQueryParam(testapi.Default.Version()): []string{}, }, }, Response: Response{StatusCode: 200, Body: &api.EventList{}}, diff --git a/pkg/client/unversioned/experimental.go b/pkg/client/unversioned/experimental.go index 03d90d033a2..13b0bf76a48 100644 --- a/pkg/client/unversioned/experimental.go +++ b/pkg/client/unversioned/experimental.go @@ -63,12 +63,12 @@ func (c *ExperimentalClient) ServerVersion() (*version.Info, error) { // ServerAPIVersions retrieves and parses the list of experimental API versions the // server supports. -func (c *ExperimentalClient) ServerAPIVersions() (*api.APIVersions, error) { +func (c *ExperimentalClient) ServerAPIVersions() (*unversioned.APIVersions, error) { body, err := c.Get().UnversionedPath("").Do().Raw() if err != nil { return nil, err } - var v api.APIVersions + var v unversioned.APIVersions err = json.Unmarshal(body, &v) if err != nil { return nil, fmt.Errorf("got '%s': %v", string(body), err) diff --git a/pkg/client/unversioned/helper_blackbox_test.go b/pkg/client/unversioned/helper_blackbox_test.go index 5a1309e869a..9c0bc63cdbe 100644 --- a/pkg/client/unversioned/helper_blackbox_test.go +++ b/pkg/client/unversioned/helper_blackbox_test.go @@ -90,10 +90,10 @@ func TestNegotiateVersion(t *testing.T) { Codec: codec, Resp: &http.Response{ StatusCode: 200, - Body: objBody(&api.APIVersions{Versions: test.serverVersions}), + Body: objBody(&unversioned.APIVersions{Versions: test.serverVersions}), }, Client: fake.HTTPClientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{StatusCode: 200, Body: objBody(&api.APIVersions{Versions: test.serverVersions})}, nil + return &http.Response{StatusCode: 200, Body: objBody(&unversioned.APIVersions{Versions: test.serverVersions})}, nil }), } c := unversioned.NewOrDie(test.config) diff --git a/pkg/client/unversioned/nodes_test.go b/pkg/client/unversioned/nodes_test.go index 81124cdfe12..96d67d64174 100644 --- a/pkg/client/unversioned/nodes_test.go +++ b/pkg/client/unversioned/nodes_test.go @@ -45,7 +45,7 @@ func TestListNodes(t *testing.T) { } func TestListNodesLabels(t *testing.T) { - labelSelectorQueryParamName := api.LabelSelectorQueryParam(testapi.Default.Version()) + labelSelectorQueryParamName := unversioned.LabelSelectorQueryParam(testapi.Default.Version()) c := &testClient{ Request: testRequest{ Method: "GET", diff --git a/pkg/client/unversioned/pods_test.go b/pkg/client/unversioned/pods_test.go index ad28e089ddb..967282f0dcb 100644 --- a/pkg/client/unversioned/pods_test.go +++ b/pkg/client/unversioned/pods_test.go @@ -64,7 +64,7 @@ func TestListPods(t *testing.T) { func TestListPodsLabels(t *testing.T) { ns := api.NamespaceDefault - labelSelectorQueryParamName := api.LabelSelectorQueryParam(testapi.Default.Version()) + labelSelectorQueryParamName := unversioned.LabelSelectorQueryParam(testapi.Default.Version()) c := &testClient{ Request: testRequest{ Method: "GET", diff --git a/pkg/client/unversioned/request.go b/pkg/client/unversioned/request.go index 67df03ca8ac..b8514be0603 100644 --- a/pkg/client/unversioned/request.go +++ b/pkg/client/unversioned/request.go @@ -372,7 +372,7 @@ func (r *Request) FieldsSelectorParam(s fields.Selector) *Request { r.err = err return r } - return r.setParam(api.FieldSelectorQueryParam(r.apiVersion), s2.String()) + return r.setParam(unversioned.FieldSelectorQueryParam(r.apiVersion), s2.String()) } // LabelsSelectorParam adds the given selector as a query parameter @@ -386,7 +386,7 @@ func (r *Request) LabelsSelectorParam(s labels.Selector) *Request { if s.Empty() { return r } - return r.setParam(api.LabelSelectorQueryParam(r.apiVersion), s.String()) + return r.setParam(unversioned.LabelSelectorQueryParam(r.apiVersion), s.String()) } // UintParam creates a query parameter with the given value. diff --git a/pkg/client/unversioned/request_test.go b/pkg/client/unversioned/request_test.go index c73c5123307..ce55d36c435 100644 --- a/pkg/client/unversioned/request_test.go +++ b/pkg/client/unversioned/request_test.go @@ -777,7 +777,7 @@ func TestDoRequestNewWayReader(t *testing.T) { } tmpStr := string(reqBodyExpected) requestURL := testapi.Default.ResourcePathWithPrefix("foo", "bar", "", "baz") - requestURL += "?" + api.LabelSelectorQueryParam(testapi.Default.Version()) + "=name%3Dfoo&timeout=1s" + requestURL += "?" + unversioned.LabelSelectorQueryParam(testapi.Default.Version()) + "=name%3Dfoo&timeout=1s" fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) if fakeHandler.RequestReceived.Header["Authorization"] == nil { t.Errorf("Request is missing authorization header: %#v", *fakeHandler.RequestReceived) @@ -819,7 +819,7 @@ func TestDoRequestNewWayObj(t *testing.T) { } tmpStr := string(reqBodyExpected) requestURL := testapi.Default.ResourcePath("foo", "", "bar/baz") - requestURL += "?" + api.LabelSelectorQueryParam(testapi.Default.Version()) + "=name%3Dfoo&timeout=1s" + requestURL += "?" + unversioned.LabelSelectorQueryParam(testapi.Default.Version()) + "=name%3Dfoo&timeout=1s" fakeHandler.ValidateRequest(t, requestURL, "POST", &tmpStr) if fakeHandler.RequestReceived.Header["Authorization"] == nil { t.Errorf("Request is missing authorization header: %#v", *fakeHandler.RequestReceived) diff --git a/pkg/client/unversioned/services_test.go b/pkg/client/unversioned/services_test.go index fb1e638f056..c203e2e2c39 100644 --- a/pkg/client/unversioned/services_test.go +++ b/pkg/client/unversioned/services_test.go @@ -60,7 +60,7 @@ func TestListServices(t *testing.T) { func TestListServicesLabels(t *testing.T) { ns := api.NamespaceDefault - labelSelectorQueryParamName := api.LabelSelectorQueryParam(testapi.Default.Version()) + labelSelectorQueryParamName := unversioned.LabelSelectorQueryParam(testapi.Default.Version()) c := &testClient{ Request: testRequest{ Method: "GET", diff --git a/pkg/client/unversioned/testclient/testclient.go b/pkg/client/unversioned/testclient/testclient.go index e12ac26dacb..f123d54a86f 100644 --- a/pkg/client/unversioned/testclient/testclient.go +++ b/pkg/client/unversioned/testclient/testclient.go @@ -281,13 +281,13 @@ func (c *Fake) ServerVersion() (*version.Info, error) { return &versionInfo, nil } -func (c *Fake) ServerAPIVersions() (*api.APIVersions, error) { +func (c *Fake) ServerAPIVersions() (*unversioned.APIVersions, error) { action := ActionImpl{} action.Verb = "get" action.Resource = "apiversions" c.Invokes(action, nil) - return &api.APIVersions{Versions: registered.RegisteredVersions}, nil + return &unversioned.APIVersions{Versions: registered.RegisteredVersions}, nil } func (c *Fake) ComponentStatuses() client.ComponentStatusInterface { diff --git a/pkg/kubectl/cmd/apiversions.go b/pkg/kubectl/cmd/apiversions.go index 617142501a0..0126ff9579a 100644 --- a/pkg/kubectl/cmd/apiversions.go +++ b/pkg/kubectl/cmd/apiversions.go @@ -57,7 +57,7 @@ func RunApiVersions(f *cmdutil.Factory, w io.Writer) error { os.Exit(1) } - var expAPIVersions *api.APIVersions + var expAPIVersions *unversioned.APIVersions expAPIVersions, err = client.Experimental().ServerAPIVersions() fmt.Fprintf(w, "Available Server Api Versions: %#v\n", *apiVersions) diff --git a/pkg/kubectl/cmd/delete_test.go b/pkg/kubectl/cmd/delete_test.go index 4995bce2ef7..0a71017106b 100644 --- a/pkg/kubectl/cmd/delete_test.go +++ b/pkg/kubectl/cmd/delete_test.go @@ -416,12 +416,12 @@ func TestDeleteMultipleSelector(t *testing.T) { Client: fake.HTTPClientFunc(func(req *http.Request) (*http.Response, error) { switch p, m := req.URL.Path, req.Method; { case p == "/namespaces/test/pods" && m == "GET": - if req.URL.Query().Get(api.LabelSelectorQueryParam(testapi.Default.Version())) != "a=b" { + if req.URL.Query().Get(unversioned.LabelSelectorQueryParam(testapi.Default.Version())) != "a=b" { t.Fatalf("unexpected request: %#v\n%#v", req.URL, req) } return &http.Response{StatusCode: 200, Body: objBody(codec, pods)}, nil case p == "/namespaces/test/services" && m == "GET": - if req.URL.Query().Get(api.LabelSelectorQueryParam(testapi.Default.Version())) != "a=b" { + if req.URL.Query().Get(unversioned.LabelSelectorQueryParam(testapi.Default.Version())) != "a=b" { t.Fatalf("unexpected request: %#v\n%#v", req.URL, req) } return &http.Response{StatusCode: 200, Body: objBody(codec, svc)}, nil diff --git a/pkg/kubectl/cmd/get_test.go b/pkg/kubectl/cmd/get_test.go index de21ba41118..e5f07480da1 100644 --- a/pkg/kubectl/cmd/get_test.go +++ b/pkg/kubectl/cmd/get_test.go @@ -507,7 +507,7 @@ func TestGetMultipleTypeObjectsWithSelector(t *testing.T) { tf.Client = &fake.RESTClient{ Codec: codec, Client: fake.HTTPClientFunc(func(req *http.Request) (*http.Response, error) { - if req.URL.Query().Get(api.LabelSelectorQueryParam(testapi.Default.Version())) != "a=b" { + if req.URL.Query().Get(unversioned.LabelSelectorQueryParam(testapi.Default.Version())) != "a=b" { t.Fatalf("unexpected request: %#v\n%#v", req.URL, req) } switch req.URL.Path { @@ -633,7 +633,7 @@ func TestWatchSelector(t *testing.T) { tf.Client = &fake.RESTClient{ Codec: codec, Client: fake.HTTPClientFunc(func(req *http.Request) (*http.Response, error) { - if req.URL.Query().Get(api.LabelSelectorQueryParam(testapi.Default.Version())) != "a=b" { + if req.URL.Query().Get(unversioned.LabelSelectorQueryParam(testapi.Default.Version())) != "a=b" { t.Fatalf("unexpected request: %#v\n%#v", req.URL, req) } switch req.URL.Path { diff --git a/pkg/kubectl/resource/builder_test.go b/pkg/kubectl/resource/builder_test.go index f4f665d7603..a930aafe642 100644 --- a/pkg/kubectl/resource/builder_test.go +++ b/pkg/kubectl/resource/builder_test.go @@ -504,7 +504,7 @@ func TestResourceByNameAndEmptySelector(t *testing.T) { func TestSelector(t *testing.T) { pods, svc := testData() - labelKey := api.LabelSelectorQueryParam(testapi.Default.Version()) + labelKey := unversioned.LabelSelectorQueryParam(testapi.Default.Version()) b := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClientWith("", t, map[string]string{ "/namespaces/test/pods?" + labelKey + "=a%3Db": runtime.EncodeOrDie(testapi.Default.Codec(), pods), "/namespaces/test/services?" + labelKey + "=a%3Db": runtime.EncodeOrDie(testapi.Default.Codec(), svc), @@ -905,7 +905,7 @@ func TestSingularRootScopedObject(t *testing.T) { func TestListObject(t *testing.T) { pods, _ := testData() - labelKey := api.LabelSelectorQueryParam(testapi.Default.Version()) + labelKey := unversioned.LabelSelectorQueryParam(testapi.Default.Version()) b := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClientWith("", t, map[string]string{ "/namespaces/test/pods?" + labelKey + "=a%3Db": runtime.EncodeOrDie(testapi.Default.Codec(), pods), })). @@ -938,7 +938,7 @@ func TestListObject(t *testing.T) { func TestListObjectWithDifferentVersions(t *testing.T) { pods, svc := testData() - labelKey := api.LabelSelectorQueryParam(testapi.Default.Version()) + labelKey := unversioned.LabelSelectorQueryParam(testapi.Default.Version()) obj, err := NewBuilder(testapi.Default.RESTMapper(), api.Scheme, fakeClientWith("", t, map[string]string{ "/namespaces/test/pods?" + labelKey + "=a%3Db": runtime.EncodeOrDie(testapi.Default.Codec(), pods), "/namespaces/test/services?" + labelKey + "=a%3Db": runtime.EncodeOrDie(testapi.Default.Codec(), svc), diff --git a/pkg/kubectl/resource/helper_test.go b/pkg/kubectl/resource/helper_test.go index 75c9f847a47..8566f3c6882 100644 --- a/pkg/kubectl/resource/helper_test.go +++ b/pkg/kubectl/resource/helper_test.go @@ -328,7 +328,7 @@ func TestHelperList(t *testing.T) { t.Errorf("url doesn't contain name: %#v", req.URL) return false } - if req.URL.Query().Get(api.LabelSelectorQueryParam(testapi.Default.Version())) != labels.SelectorFromSet(labels.Set{"foo": "baz"}).String() { + if req.URL.Query().Get(unversioned.LabelSelectorQueryParam(testapi.Default.Version())) != labels.SelectorFromSet(labels.Set{"foo": "baz"}).String() { t.Errorf("url doesn't contain query parameters: %#v", req.URL) return false } diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 88729a403aa..af9344491aa 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -723,12 +723,12 @@ func checkOutput(output string, required [][]string) { } } -func getAPIVersions(apiEndpoint string) (*api.APIVersions, error) { +func getAPIVersions(apiEndpoint string) (*unversioned.APIVersions, error) { body, err := curl(apiEndpoint) if err != nil { return nil, fmt.Errorf("Failed http.Get of %s: %v", apiEndpoint, err) } - var apiVersions api.APIVersions + var apiVersions unversioned.APIVersions if err := json.Unmarshal([]byte(body), &apiVersions); err != nil { return nil, fmt.Errorf("Failed to parse /api output %s: %v", body, err) } From cbb3deb1822630fe118f18f415701a2b5c0040b7 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 18:32:15 -0700 Subject: [PATCH 03/15] run goimports --- pkg/apiserver/apiserver.go | 1 + pkg/client/cache/listwatch_test.go | 1 + pkg/client/unversioned/client_test.go | 1 + pkg/client/unversioned/experimental.go | 2 +- pkg/client/unversioned/helper_blackbox_test.go | 1 - pkg/client/unversioned/pods_test.go | 1 + pkg/client/unversioned/request.go | 1 - pkg/client/unversioned/services_test.go | 1 + pkg/client/unversioned/testclient/testclient.go | 1 + pkg/kubectl/cmd/apiversions.go | 2 +- pkg/kubectl/cmd/delete_test.go | 1 + test/e2e/kubectl.go | 1 + 12 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index fa0b612bf10..31f44cafbee 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -36,6 +36,7 @@ import ( "k8s.io/kubernetes/pkg/api/latest" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/api/rest" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apiserver/metrics" "k8s.io/kubernetes/pkg/healthz" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/client/cache/listwatch_test.go b/pkg/client/cache/listwatch_test.go index c24fe2613c7..db34c48ebba 100644 --- a/pkg/client/cache/listwatch_test.go +++ b/pkg/client/cache/listwatch_test.go @@ -23,6 +23,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" + "k8s.io/kubernetes/pkg/api/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/util" diff --git a/pkg/client/unversioned/client_test.go b/pkg/client/unversioned/client_test.go index 8c6d97d056a..746fe19fe9e 100644 --- a/pkg/client/unversioned/client_test.go +++ b/pkg/client/unversioned/client_test.go @@ -30,6 +30,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/client/unversioned/experimental.go b/pkg/client/unversioned/experimental.go index 13b0bf76a48..300242ea02f 100644 --- a/pkg/client/unversioned/experimental.go +++ b/pkg/client/unversioned/experimental.go @@ -21,8 +21,8 @@ import ( "fmt" "strings" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/latest" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/version" ) diff --git a/pkg/client/unversioned/helper_blackbox_test.go b/pkg/client/unversioned/helper_blackbox_test.go index 9c0bc63cdbe..81e8ca990ee 100644 --- a/pkg/client/unversioned/helper_blackbox_test.go +++ b/pkg/client/unversioned/helper_blackbox_test.go @@ -24,7 +24,6 @@ import ( "net/http" "testing" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/fake" diff --git a/pkg/client/unversioned/pods_test.go b/pkg/client/unversioned/pods_test.go index 967282f0dcb..2e2a41725c9 100644 --- a/pkg/client/unversioned/pods_test.go +++ b/pkg/client/unversioned/pods_test.go @@ -22,6 +22,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/labels" ) diff --git a/pkg/client/unversioned/request.go b/pkg/client/unversioned/request.go index b8514be0603..e0c1d41af52 100644 --- a/pkg/client/unversioned/request.go +++ b/pkg/client/unversioned/request.go @@ -30,7 +30,6 @@ import ( "time" "github.com/golang/glog" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/metrics" diff --git a/pkg/client/unversioned/services_test.go b/pkg/client/unversioned/services_test.go index c203e2e2c39..94c365b614b 100644 --- a/pkg/client/unversioned/services_test.go +++ b/pkg/client/unversioned/services_test.go @@ -22,6 +22,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/labels" ) diff --git a/pkg/client/unversioned/testclient/testclient.go b/pkg/client/unversioned/testclient/testclient.go index f123d54a86f..69569f94086 100644 --- a/pkg/client/unversioned/testclient/testclient.go +++ b/pkg/client/unversioned/testclient/testclient.go @@ -24,6 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/registered" + "k8s.io/kubernetes/pkg/api/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/version" diff --git a/pkg/kubectl/cmd/apiversions.go b/pkg/kubectl/cmd/apiversions.go index 0126ff9579a..bc7cfc70f4d 100644 --- a/pkg/kubectl/cmd/apiversions.go +++ b/pkg/kubectl/cmd/apiversions.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/unversioned" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) diff --git a/pkg/kubectl/cmd/delete_test.go b/pkg/kubectl/cmd/delete_test.go index 0a71017106b..c74a1c07942 100644 --- a/pkg/kubectl/cmd/delete_test.go +++ b/pkg/kubectl/cmd/delete_test.go @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/testapi" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/fake" ) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index af9344491aa..baf56774d87 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -37,6 +37,7 @@ import ( "k8s.io/kubernetes/pkg/api" apierrs "k8s.io/kubernetes/pkg/api/errors" + "k8s.io/kubernetes/pkg/api/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/fields" "k8s.io/kubernetes/pkg/kubectl" From e3d984be2774b18f62919748510d04aa451d261c Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 18:33:22 -0700 Subject: [PATCH 04/15] run grep-sed --- pkg/apiserver/api_installer.go | 6 +++--- pkg/apiserver/apiserver.go | 17 ++++++++--------- pkg/master/master.go | 6 +++--- pkg/master/master_test.go | 4 ++-- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/pkg/apiserver/api_installer.go b/pkg/apiserver/api_installer.go index 54a2c188f13..c76f7d12bca 100644 --- a/pkg/apiserver/api_installer.go +++ b/pkg/apiserver/api_installer.go @@ -61,7 +61,7 @@ type documentable interface { var errEmptyName = errors.NewBadRequest("name must be provided") // Installs handlers for API resources. -func (a *APIInstaller) Install(ws *restful.WebService) (apiResources []api.APIResource, errors []error) { +func (a *APIInstaller) Install(ws *restful.WebService) (apiResources []unversioned.APIResource, errors []error) { errors = make([]error, 0) proxyHandler := (&ProxyHandler{a.prefix + "/proxy/", a.group.Storage, a.group.Codec, a.group.Context, a.info, a.proxyDialerFn}) @@ -100,7 +100,7 @@ func (a *APIInstaller) NewWebService() *restful.WebService { return ws } -func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storage, ws *restful.WebService, proxyHandler http.Handler) (*api.APIResource, error) { +func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storage, ws *restful.WebService, proxyHandler http.Handler) (*unversioned.APIResource, error) { admit := a.group.Admit context := a.group.Context @@ -267,7 +267,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag params := []*restful.Parameter{} actions := []action{} - var apiResource api.APIResource + var apiResource unversioned.APIResource // Get the list of actions for the given scope. switch scope.Name() { case meta.RESTScopeNameRoot: diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index 31f44cafbee..cd12fbe9d74 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -46,7 +46,6 @@ import ( "k8s.io/kubernetes/pkg/util/wsstream" "k8s.io/kubernetes/pkg/version" - "github.com/emicklei/go-restful" "github.com/golang/glog" "github.com/prometheus/client_golang/prometheus" ) @@ -259,7 +258,7 @@ func AddApiWebService(container *restful.Container, apiPrefix string, versions [ } // Adds a service to return the supported api versions at /apis. -func AddApisWebService(container *restful.Container, apiPrefix string, groups []api.APIGroup) { +func AddApisWebService(container *restful.Container, apiPrefix string, groups []unversioned.APIGroup) { rootAPIHandler := RootAPIHandler(groups) ws := new(restful.WebService) ws.Path(apiPrefix) @@ -274,7 +273,7 @@ func AddApisWebService(container *restful.Container, apiPrefix string, groups [] // Adds a service to return the supported versions, preferred version, and name // of a group. E.g., a such web service will be registered at /apis/extensions. -func AddGroupWebService(container *restful.Container, path string, group api.APIGroup) { +func AddGroupWebService(container *restful.Container, path string, group unversioned.APIGroup) { groupHandler := GroupHandler(group) ws := new(restful.WebService) ws.Path(path) @@ -289,7 +288,7 @@ func AddGroupWebService(container *restful.Container, path string, group api.API // Adds a service to return the supported resources, E.g., a such web service // will be registered at /apis/extensions/v1. -func AddSupportedResourcesWebService(ws *restful.WebService, groupVersion string, apiResources []api.APIResource) { +func AddSupportedResourcesWebService(ws *restful.WebService, groupVersion string, apiResources []unversioned.APIResource) { resourceHandler := SupportedResourcesHandler(groupVersion, apiResources) ws.Route(ws.GET("/").To(resourceHandler). Doc("get available resources"). @@ -313,16 +312,16 @@ func APIVersionHandler(versions ...string) restful.RouteFunction { } // RootAPIHandler returns a handler which will list the provided groups and versions as available. -func RootAPIHandler(groups []api.APIGroup) restful.RouteFunction { +func RootAPIHandler(groups []unversioned.APIGroup) restful.RouteFunction { return func(req *restful.Request, resp *restful.Response) { // TODO: use restful's Response methods - writeRawJSON(http.StatusOK, api.APIGroupList{Groups: groups}, resp.ResponseWriter) + writeRawJSON(http.StatusOK, unversioned.APIGroupList{Groups: groups}, resp.ResponseWriter) } } // GroupHandler returns a handler which will return the api.GroupAndVersion of // the group. -func GroupHandler(group api.APIGroup) restful.RouteFunction { +func GroupHandler(group unversioned.APIGroup) restful.RouteFunction { return func(req *restful.Request, resp *restful.Response) { // TODO: use restful's Response methods writeRawJSON(http.StatusOK, group, resp.ResponseWriter) @@ -330,10 +329,10 @@ func GroupHandler(group api.APIGroup) restful.RouteFunction { } // SupportedResourcesHandler returns a handler which will list the provided resources as available. -func SupportedResourcesHandler(groupVersion string, apiResources []api.APIResource) restful.RouteFunction { +func SupportedResourcesHandler(groupVersion string, apiResources []unversioned.APIResource) restful.RouteFunction { return func(req *restful.Request, resp *restful.Response) { // TODO: use restful's Response methods - writeRawJSON(http.StatusOK, api.APIResourceList{GroupVersion: groupVersion, APIResources: apiResources}, resp.ResponseWriter) + writeRawJSON(http.StatusOK, unversioned.APIResourceList{GroupVersion: groupVersion, APIResources: apiResources}, resp.ResponseWriter) } } diff --git a/pkg/master/master.go b/pkg/master/master.go index eea51fa7af0..fb45a1d036d 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -651,7 +651,7 @@ func (m *Master) init(c *Config) { apiserver.InstallServiceErrorHandler(m.handlerContainer, m.newAPIRequestInfoResolver(), apiVersions) // allGroups records all supported groups at /apis - allGroups := []api.APIGroup{} + allGroups := []unversioned.APIGroup{} if m.exp { m.thirdPartyStorage = c.StorageDestinations.APIGroups["extensions"].Default m.thirdPartyResources = map[string]*thirdpartyresourcedataetcd.REST{} @@ -675,7 +675,7 @@ func (m *Master) init(c *Config) { if !found { glog.Fatalf("Couldn't find storage version of group %v", g.Group) } - group := api.APIGroup{ + group := unversioned.APIGroup{ Name: g.Group, Versions: expAPIVersions, PreferredVersion: api.GroupVersion{GroupVersion: storageVersion, Version: apiutil.GetVersion(storageVersion)}, @@ -995,7 +995,7 @@ func (m *Master) InstallThirdPartyResource(rsrc *expapi.ThirdPartyResource) erro GroupVersion: group + "/" + rsrc.Versions[0].Name, Version: rsrc.Versions[0].Name, } - apiGroup := api.APIGroup{ + apiGroup := unversioned.APIGroup{ Name: group, Versions: []api.GroupVersion{groupVersion}, } diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index f00f76b9de0..064191c656a 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -287,7 +287,7 @@ func TestDefaultAPIGroupVersion(t *testing.T) { } // TestExpapi verifies that the unexported exapi creates -// the an experimental api APIGroupVersion. +// the an experimental unversioned.APIGroupVersion. func TestExpapi(t *testing.T) { master, config, assert := setUp(t) @@ -465,7 +465,7 @@ func TestDiscoveryAtAPIS(t *testing.T) { assert.Equal(http.StatusOK, resp.StatusCode) - groupList := api.APIGroupList{} + groupList := unversioned.APIGroupList{} assert.NoError(decodeResponse(resp, &groupList)) if err != nil { t.Fatalf("unexpected error: %v", err) From 29d3351b6971fe7ed485616ada6cfdd1e0518fd7 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 18:33:33 -0700 Subject: [PATCH 05/15] run goimports --- pkg/apiserver/api_installer.go | 1 + pkg/master/master.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/apiserver/api_installer.go b/pkg/apiserver/api_installer.go index c76f7d12bca..23eb8b49da9 100644 --- a/pkg/apiserver/api_installer.go +++ b/pkg/apiserver/api_installer.go @@ -29,6 +29,7 @@ import ( "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/api/rest" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/conversion" "k8s.io/kubernetes/pkg/runtime" watchjson "k8s.io/kubernetes/pkg/watch/json" diff --git a/pkg/master/master.go b/pkg/master/master.go index fb45a1d036d..3be61849f1a 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -36,6 +36,7 @@ import ( "k8s.io/kubernetes/pkg/api/latest" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/api/rest" + "k8s.io/kubernetes/pkg/api/unversioned" apiutil "k8s.io/kubernetes/pkg/api/util" "k8s.io/kubernetes/pkg/api/v1" expapi "k8s.io/kubernetes/pkg/apis/extensions" From 654ceb6e5a3a42d50d3dbceb2236ad8973c9a225 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 20:29:35 -0700 Subject: [PATCH 06/15] run grep-sed --- cmd/integration/integration.go | 4 ++-- pkg/apiserver/api_installer.go | 2 +- pkg/apiserver/index.go | 2 +- pkg/apiserver/resthandler.go | 6 +++--- pkg/apiserver/resthandler_test.go | 2 +- pkg/client/unversioned/fake/fake.go | 2 +- pkg/client/unversioned/restclient.go | 2 +- pkg/kubectl/interfaces.go | 2 +- pkg/kubectl/resource/helper.go | 2 +- pkg/kubectl/resource/interfaces.go | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index fbe982f4860..8d286e73692 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -667,7 +667,7 @@ func runPatchTest(c *client.Client) { glog.Fatalf("Failed creating patchservice: %v", err) } - patchBodies := map[string]map[api.PatchType]struct { + patchBodies := map[string]map[unversioned.PatchType]struct { AddLabelBody []byte RemoveLabelBody []byte RemoveAllLabelsBody []byte @@ -693,7 +693,7 @@ func runPatchTest(c *client.Client) { pb := patchBodies[c.APIVersion()] - execPatch := func(pt api.PatchType, body []byte) error { + execPatch := func(pt unversioned.PatchType, body []byte) error { return c.Patch(pt). Resource(resource). Namespace(api.NamespaceDefault). diff --git a/pkg/apiserver/api_installer.go b/pkg/apiserver/api_installer.go index 23eb8b49da9..23d7b066022 100644 --- a/pkg/apiserver/api_installer.go +++ b/pkg/apiserver/api_installer.go @@ -481,7 +481,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Operation("patch"+namespaced+kind+strings.Title(subresource)). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), "application/json")...). Returns(http.StatusOK, "OK", versionedObject). - Reads(api.Patch{}). + Reads(unversioned.Patch{}). Writes(versionedObject) addParams(route, action.Params) ws.Route(route) diff --git a/pkg/apiserver/index.go b/pkg/apiserver/index.go index 480deb6e1ac..eb4c4a9ab79 100644 --- a/pkg/apiserver/index.go +++ b/pkg/apiserver/index.go @@ -41,6 +41,6 @@ func IndexHandler(container *restful.Container, muxHelper *MuxHelper) func(http. // Extract the paths handled using mux handler. handledPaths = append(handledPaths, muxHelper.RegisteredPaths...) sort.Strings(handledPaths) - writeRawJSON(status, api.RootPaths{Paths: handledPaths}, w) + writeRawJSON(status, unversioned.RootPaths{Paths: handledPaths}, w) } } diff --git a/pkg/apiserver/resthandler.go b/pkg/apiserver/resthandler.go index 200150e4cc2..c13f65f59bb 100644 --- a/pkg/apiserver/resthandler.go +++ b/pkg/apiserver/resthandler.go @@ -407,7 +407,7 @@ func PatchResource(r rest.Patcher, scope RequestScope, typer runtime.ObjectTyper if idx := strings.Index(contentType, ";"); idx > 0 { contentType = contentType[:idx] } - patchType := api.PatchType(contentType) + patchType := unversioned.PatchType(contentType) patchJS, err := readBody(req.Request) if err != nil { @@ -432,7 +432,7 @@ func PatchResource(r rest.Patcher, scope RequestScope, typer runtime.ObjectTyper } // patchResource divides PatchResource for easier unit testing -func patchResource(ctx api.Context, timeout time.Duration, versionedObj runtime.Object, patcher rest.Patcher, name string, patchType api.PatchType, patchJS []byte, namer ScopeNamer, codec runtime.Codec) (runtime.Object, error) { +func patchResource(ctx api.Context, timeout time.Duration, versionedObj runtime.Object, patcher rest.Patcher, name string, patchType unversioned.PatchType, patchJS []byte, namer ScopeNamer, codec runtime.Codec) (runtime.Object, error) { namespace := api.NamespaceValue(ctx) original, err := patcher.Get(ctx, name) @@ -806,7 +806,7 @@ func setListSelfLink(obj runtime.Object, req *restful.Request, namer ScopeNamer) } -func getPatchedJS(patchType api.PatchType, originalJS, patchJS []byte, obj runtime.Object) ([]byte, error) { +func getPatchedJS(patchType unversioned.PatchType, originalJS, patchJS []byte, obj runtime.Object) ([]byte, error) { switch patchType { case api.JSONPatchType: patchObj, err := jsonpatch.DecodePatch(patchJS) diff --git a/pkg/apiserver/resthandler_test.go b/pkg/apiserver/resthandler_test.go index 18fdddd933a..0bd423703b8 100644 --- a/pkg/apiserver/resthandler_test.go +++ b/pkg/apiserver/resthandler_test.go @@ -169,7 +169,7 @@ func (tc *patchTestCase) Run(t *testing.T) { return } - for _, patchType := range []api.PatchType{api.JSONPatchType, api.MergePatchType, api.StrategicMergePatchType} { + for _, patchType := range []unversioned.PatchType{api.JSONPatchType, api.MergePatchType, api.StrategicMergePatchType} { // TODO SUPPORT THIS! if patchType == api.JSONPatchType { continue diff --git a/pkg/client/unversioned/fake/fake.go b/pkg/client/unversioned/fake/fake.go index 8e77910a649..189df3f8d4b 100644 --- a/pkg/client/unversioned/fake/fake.go +++ b/pkg/client/unversioned/fake/fake.go @@ -51,7 +51,7 @@ func (c *RESTClient) Put() *unversioned.Request { return unversioned.NewRequest(c, "PUT", &url.URL{Host: "localhost"}, testapi.Default.Version(), c.Codec) } -func (c *RESTClient) Patch(_ api.PatchType) *unversioned.Request { +func (c *RESTClient) Patch(_ unversioned.PatchType) *unversioned.Request { return unversioned.NewRequest(c, "PATCH", &url.URL{Host: "localhost"}, testapi.Default.Version(), c.Codec) } diff --git a/pkg/client/unversioned/restclient.go b/pkg/client/unversioned/restclient.go index db7ab1ee2b5..a0f1d5e07a2 100644 --- a/pkg/client/unversioned/restclient.go +++ b/pkg/client/unversioned/restclient.go @@ -105,7 +105,7 @@ func (c *RESTClient) Put() *Request { } // Patch begins a PATCH request. Short for c.Verb("Patch"). -func (c *RESTClient) Patch(pt api.PatchType) *Request { +func (c *RESTClient) Patch(pt unversioned.PatchType) *Request { return c.Verb("PATCH").SetHeader("Content-Type", string(pt)) } diff --git a/pkg/kubectl/interfaces.go b/pkg/kubectl/interfaces.go index 890947b5c6c..6b75885d874 100644 --- a/pkg/kubectl/interfaces.go +++ b/pkg/kubectl/interfaces.go @@ -26,7 +26,7 @@ import ( type RESTClient interface { Get() *client.Request Post() *client.Request - Patch(api.PatchType) *client.Request + Patch(unversioned.PatchType) *client.Request Delete() *client.Request Put() *client.Request } diff --git a/pkg/kubectl/resource/helper.go b/pkg/kubectl/resource/helper.go index 4af6c8272f4..59b5cebfb65 100644 --- a/pkg/kubectl/resource/helper.go +++ b/pkg/kubectl/resource/helper.go @@ -131,7 +131,7 @@ func (m *Helper) Create(namespace string, modify bool, data []byte) (runtime.Obj func (m *Helper) createResource(c RESTClient, resource, namespace string, data []byte) (runtime.Object, error) { return c.Post().NamespaceIfScoped(namespace, m.NamespaceScoped).Resource(resource).Body(data).Do().Get() } -func (m *Helper) Patch(namespace, name string, pt api.PatchType, data []byte) (runtime.Object, error) { +func (m *Helper) Patch(namespace, name string, pt unversioned.PatchType, data []byte) (runtime.Object, error) { return m.RESTClient.Patch(pt). NamespaceIfScoped(namespace, m.NamespaceScoped). Resource(m.Resource). diff --git a/pkg/kubectl/resource/interfaces.go b/pkg/kubectl/resource/interfaces.go index 3d64609984a..45b11164485 100644 --- a/pkg/kubectl/resource/interfaces.go +++ b/pkg/kubectl/resource/interfaces.go @@ -27,7 +27,7 @@ import ( type RESTClient interface { Get() *client.Request Post() *client.Request - Patch(api.PatchType) *client.Request + Patch(unversioned.PatchType) *client.Request Delete() *client.Request Put() *client.Request } From 58ed8fd6fedc15f646582f39bbf46d9c0edf23f5 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 20:30:24 -0700 Subject: [PATCH 07/15] run goimports --- pkg/apiserver/index.go | 2 +- pkg/client/unversioned/fake/fake.go | 1 - pkg/client/unversioned/restclient.go | 1 - pkg/kubectl/interfaces.go | 5 +---- pkg/kubectl/resource/helper.go | 1 - pkg/kubectl/resource/interfaces.go | 1 - 6 files changed, 2 insertions(+), 9 deletions(-) diff --git a/pkg/apiserver/index.go b/pkg/apiserver/index.go index eb4c4a9ab79..c01174d75d1 100644 --- a/pkg/apiserver/index.go +++ b/pkg/apiserver/index.go @@ -20,7 +20,7 @@ import ( "net/http" "sort" - "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/unversioned" "github.com/emicklei/go-restful" ) diff --git a/pkg/client/unversioned/fake/fake.go b/pkg/client/unversioned/fake/fake.go index 189df3f8d4b..9c1be399824 100644 --- a/pkg/client/unversioned/fake/fake.go +++ b/pkg/client/unversioned/fake/fake.go @@ -22,7 +22,6 @@ import ( "net/http" "net/url" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/client/unversioned/restclient.go b/pkg/client/unversioned/restclient.go index a0f1d5e07a2..99462a666da 100644 --- a/pkg/client/unversioned/restclient.go +++ b/pkg/client/unversioned/restclient.go @@ -21,7 +21,6 @@ import ( "strings" "time" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util" ) diff --git a/pkg/kubectl/interfaces.go b/pkg/kubectl/interfaces.go index 6b75885d874..d39a822acd6 100644 --- a/pkg/kubectl/interfaces.go +++ b/pkg/kubectl/interfaces.go @@ -16,10 +16,7 @@ limitations under the License. package kubectl -import ( - "k8s.io/kubernetes/pkg/api" - client "k8s.io/kubernetes/pkg/client/unversioned" -) +import client "k8s.io/kubernetes/pkg/client/unversioned" // RESTClient is a client helper for dealing with RESTful resources // in a generic way. diff --git a/pkg/kubectl/resource/helper.go b/pkg/kubectl/resource/helper.go index 59b5cebfb65..54c12a92856 100644 --- a/pkg/kubectl/resource/helper.go +++ b/pkg/kubectl/resource/helper.go @@ -17,7 +17,6 @@ limitations under the License. package resource import ( - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/kubectl/resource/interfaces.go b/pkg/kubectl/resource/interfaces.go index 45b11164485..1a07c36844d 100644 --- a/pkg/kubectl/resource/interfaces.go +++ b/pkg/kubectl/resource/interfaces.go @@ -17,7 +17,6 @@ limitations under the License. package resource import ( - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" client "k8s.io/kubernetes/pkg/client/unversioned" ) From 8654227c08124ee3150be684acaf7b12019cd117 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 20:44:54 -0700 Subject: [PATCH 08/15] run grep-sed --- cmd/integration/integration.go | 4 ++-- pkg/apiserver/resthandler.go | 6 +++--- pkg/apiserver/resthandler_test.go | 2 +- pkg/client/unversioned/fake/fake.go | 2 +- pkg/client/unversioned/restclient.go | 2 +- pkg/kubectl/interfaces.go | 2 +- pkg/kubectl/resource/helper.go | 2 +- pkg/kubectl/resource/interfaces.go | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 8d286e73692..fbe982f4860 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -667,7 +667,7 @@ func runPatchTest(c *client.Client) { glog.Fatalf("Failed creating patchservice: %v", err) } - patchBodies := map[string]map[unversioned.PatchType]struct { + patchBodies := map[string]map[api.PatchType]struct { AddLabelBody []byte RemoveLabelBody []byte RemoveAllLabelsBody []byte @@ -693,7 +693,7 @@ func runPatchTest(c *client.Client) { pb := patchBodies[c.APIVersion()] - execPatch := func(pt unversioned.PatchType, body []byte) error { + execPatch := func(pt api.PatchType, body []byte) error { return c.Patch(pt). Resource(resource). Namespace(api.NamespaceDefault). diff --git a/pkg/apiserver/resthandler.go b/pkg/apiserver/resthandler.go index c13f65f59bb..200150e4cc2 100644 --- a/pkg/apiserver/resthandler.go +++ b/pkg/apiserver/resthandler.go @@ -407,7 +407,7 @@ func PatchResource(r rest.Patcher, scope RequestScope, typer runtime.ObjectTyper if idx := strings.Index(contentType, ";"); idx > 0 { contentType = contentType[:idx] } - patchType := unversioned.PatchType(contentType) + patchType := api.PatchType(contentType) patchJS, err := readBody(req.Request) if err != nil { @@ -432,7 +432,7 @@ func PatchResource(r rest.Patcher, scope RequestScope, typer runtime.ObjectTyper } // patchResource divides PatchResource for easier unit testing -func patchResource(ctx api.Context, timeout time.Duration, versionedObj runtime.Object, patcher rest.Patcher, name string, patchType unversioned.PatchType, patchJS []byte, namer ScopeNamer, codec runtime.Codec) (runtime.Object, error) { +func patchResource(ctx api.Context, timeout time.Duration, versionedObj runtime.Object, patcher rest.Patcher, name string, patchType api.PatchType, patchJS []byte, namer ScopeNamer, codec runtime.Codec) (runtime.Object, error) { namespace := api.NamespaceValue(ctx) original, err := patcher.Get(ctx, name) @@ -806,7 +806,7 @@ func setListSelfLink(obj runtime.Object, req *restful.Request, namer ScopeNamer) } -func getPatchedJS(patchType unversioned.PatchType, originalJS, patchJS []byte, obj runtime.Object) ([]byte, error) { +func getPatchedJS(patchType api.PatchType, originalJS, patchJS []byte, obj runtime.Object) ([]byte, error) { switch patchType { case api.JSONPatchType: patchObj, err := jsonpatch.DecodePatch(patchJS) diff --git a/pkg/apiserver/resthandler_test.go b/pkg/apiserver/resthandler_test.go index 0bd423703b8..18fdddd933a 100644 --- a/pkg/apiserver/resthandler_test.go +++ b/pkg/apiserver/resthandler_test.go @@ -169,7 +169,7 @@ func (tc *patchTestCase) Run(t *testing.T) { return } - for _, patchType := range []unversioned.PatchType{api.JSONPatchType, api.MergePatchType, api.StrategicMergePatchType} { + for _, patchType := range []api.PatchType{api.JSONPatchType, api.MergePatchType, api.StrategicMergePatchType} { // TODO SUPPORT THIS! if patchType == api.JSONPatchType { continue diff --git a/pkg/client/unversioned/fake/fake.go b/pkg/client/unversioned/fake/fake.go index 9c1be399824..ecdc8bbf948 100644 --- a/pkg/client/unversioned/fake/fake.go +++ b/pkg/client/unversioned/fake/fake.go @@ -50,7 +50,7 @@ func (c *RESTClient) Put() *unversioned.Request { return unversioned.NewRequest(c, "PUT", &url.URL{Host: "localhost"}, testapi.Default.Version(), c.Codec) } -func (c *RESTClient) Patch(_ unversioned.PatchType) *unversioned.Request { +func (c *RESTClient) Patch(_ api.PatchType) *unversioned.Request { return unversioned.NewRequest(c, "PATCH", &url.URL{Host: "localhost"}, testapi.Default.Version(), c.Codec) } diff --git a/pkg/client/unversioned/restclient.go b/pkg/client/unversioned/restclient.go index 99462a666da..dcd2490f12e 100644 --- a/pkg/client/unversioned/restclient.go +++ b/pkg/client/unversioned/restclient.go @@ -104,7 +104,7 @@ func (c *RESTClient) Put() *Request { } // Patch begins a PATCH request. Short for c.Verb("Patch"). -func (c *RESTClient) Patch(pt unversioned.PatchType) *Request { +func (c *RESTClient) Patch(pt api.PatchType) *Request { return c.Verb("PATCH").SetHeader("Content-Type", string(pt)) } diff --git a/pkg/kubectl/interfaces.go b/pkg/kubectl/interfaces.go index d39a822acd6..1c7dcd48d78 100644 --- a/pkg/kubectl/interfaces.go +++ b/pkg/kubectl/interfaces.go @@ -23,7 +23,7 @@ import client "k8s.io/kubernetes/pkg/client/unversioned" type RESTClient interface { Get() *client.Request Post() *client.Request - Patch(unversioned.PatchType) *client.Request + Patch(api.PatchType) *client.Request Delete() *client.Request Put() *client.Request } diff --git a/pkg/kubectl/resource/helper.go b/pkg/kubectl/resource/helper.go index 54c12a92856..cf6cc2a8c47 100644 --- a/pkg/kubectl/resource/helper.go +++ b/pkg/kubectl/resource/helper.go @@ -130,7 +130,7 @@ func (m *Helper) Create(namespace string, modify bool, data []byte) (runtime.Obj func (m *Helper) createResource(c RESTClient, resource, namespace string, data []byte) (runtime.Object, error) { return c.Post().NamespaceIfScoped(namespace, m.NamespaceScoped).Resource(resource).Body(data).Do().Get() } -func (m *Helper) Patch(namespace, name string, pt unversioned.PatchType, data []byte) (runtime.Object, error) { +func (m *Helper) Patch(namespace, name string, pt api.PatchType, data []byte) (runtime.Object, error) { return m.RESTClient.Patch(pt). NamespaceIfScoped(namespace, m.NamespaceScoped). Resource(m.Resource). diff --git a/pkg/kubectl/resource/interfaces.go b/pkg/kubectl/resource/interfaces.go index 1a07c36844d..dd8270d878a 100644 --- a/pkg/kubectl/resource/interfaces.go +++ b/pkg/kubectl/resource/interfaces.go @@ -26,7 +26,7 @@ import ( type RESTClient interface { Get() *client.Request Post() *client.Request - Patch(unversioned.PatchType) *client.Request + Patch(api.PatchType) *client.Request Delete() *client.Request Put() *client.Request } From fe7b85f6ea1d43b997f59eb260a6b50f419fe2a8 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 20:45:16 -0700 Subject: [PATCH 09/15] run goimports --- pkg/client/unversioned/fake/fake.go | 1 + pkg/client/unversioned/restclient.go | 1 + pkg/kubectl/interfaces.go | 5 ++++- pkg/kubectl/resource/helper.go | 1 + pkg/kubectl/resource/interfaces.go | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/client/unversioned/fake/fake.go b/pkg/client/unversioned/fake/fake.go index ecdc8bbf948..8e77910a649 100644 --- a/pkg/client/unversioned/fake/fake.go +++ b/pkg/client/unversioned/fake/fake.go @@ -22,6 +22,7 @@ import ( "net/http" "net/url" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/client/unversioned/restclient.go b/pkg/client/unversioned/restclient.go index dcd2490f12e..db7ab1ee2b5 100644 --- a/pkg/client/unversioned/restclient.go +++ b/pkg/client/unversioned/restclient.go @@ -21,6 +21,7 @@ import ( "strings" "time" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util" ) diff --git a/pkg/kubectl/interfaces.go b/pkg/kubectl/interfaces.go index 1c7dcd48d78..890947b5c6c 100644 --- a/pkg/kubectl/interfaces.go +++ b/pkg/kubectl/interfaces.go @@ -16,7 +16,10 @@ limitations under the License. package kubectl -import client "k8s.io/kubernetes/pkg/client/unversioned" +import ( + "k8s.io/kubernetes/pkg/api" + client "k8s.io/kubernetes/pkg/client/unversioned" +) // RESTClient is a client helper for dealing with RESTful resources // in a generic way. diff --git a/pkg/kubectl/resource/helper.go b/pkg/kubectl/resource/helper.go index cf6cc2a8c47..4af6c8272f4 100644 --- a/pkg/kubectl/resource/helper.go +++ b/pkg/kubectl/resource/helper.go @@ -17,6 +17,7 @@ limitations under the License. package resource import ( + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/runtime" diff --git a/pkg/kubectl/resource/interfaces.go b/pkg/kubectl/resource/interfaces.go index dd8270d878a..3d64609984a 100644 --- a/pkg/kubectl/resource/interfaces.go +++ b/pkg/kubectl/resource/interfaces.go @@ -17,6 +17,7 @@ limitations under the License. package resource import ( + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" client "k8s.io/kubernetes/pkg/client/unversioned" ) From cbeb307a6062014c3517d712bcc57578381d0830 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 20:46:12 -0700 Subject: [PATCH 10/15] run grep-sed --- pkg/master/master.go | 8 ++++---- pkg/master/master_test.go | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pkg/master/master.go b/pkg/master/master.go index 3be61849f1a..ea18cd973f0 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -666,7 +666,7 @@ func (m *Master) init(c *Config) { if err != nil { glog.Fatalf("Unable to setup experimental api: %v", err) } - expAPIVersions := []api.GroupVersion{ + expAPIVersions := []unversioned.GroupVersion{ { GroupVersion: expVersion.Version, Version: apiutil.GetVersion(expVersion.Version), @@ -679,7 +679,7 @@ func (m *Master) init(c *Config) { group := unversioned.APIGroup{ Name: g.Group, Versions: expAPIVersions, - PreferredVersion: api.GroupVersion{GroupVersion: storageVersion, Version: apiutil.GetVersion(storageVersion)}, + PreferredVersion: unversioned.GroupVersion{GroupVersion: storageVersion, Version: apiutil.GetVersion(storageVersion)}, } apiserver.AddGroupWebService(m.handlerContainer, c.APIGroupPrefix+"/"+latest.GroupOrDie("extensions").Group+"/", group) allGroups = append(allGroups, group) @@ -992,13 +992,13 @@ func (m *Master) InstallThirdPartyResource(rsrc *expapi.ThirdPartyResource) erro glog.Fatalf("Unable to setup thirdparty api: %v", err) } path := makeThirdPartyPath(group) - groupVersion := api.GroupVersion{ + groupVersion := unversioned.GroupVersion{ GroupVersion: group + "/" + rsrc.Versions[0].Name, Version: rsrc.Versions[0].Name, } apiGroup := unversioned.APIGroup{ Name: group, - Versions: []api.GroupVersion{groupVersion}, + Versions: []unversioned.GroupVersion{groupVersion}, } apiserver.AddGroupWebService(m.handlerContainer, path, apiGroup) m.addThirdPartyResourceStorage(path, thirdparty.Storage[strings.ToLower(kind)+"s"].(*thirdpartyresourcedataetcd.REST)) diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index 064191c656a..39cb8e53e53 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -54,7 +54,6 @@ import ( "k8s.io/kubernetes/pkg/util" "github.com/coreos/go-etcd/etcd" - "github.com/emicklei/go-restful" "github.com/stretchr/testify/assert" ) @@ -472,13 +471,13 @@ func TestDiscoveryAtAPIS(t *testing.T) { } expectGroupName := "extensions" - expectVersions := []api.GroupVersion{ + expectVersions := []unversioned.GroupVersion{ { GroupVersion: testapi.Extensions.GroupAndVersion(), Version: testapi.Extensions.Version(), }, } - expectPreferredVersion := api.GroupVersion{ + expectPreferredVersion := unversioned.GroupVersion{ GroupVersion: config.StorageVersions["extensions"], Version: apiutil.GetVersion(config.StorageVersions["extensions"]), } From 910c1fd1308d0281126877ead813e998102c84b1 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 20:51:17 -0700 Subject: [PATCH 11/15] fix exceptions --- pkg/client/unversioned/helper_blackbox_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/client/unversioned/helper_blackbox_test.go b/pkg/client/unversioned/helper_blackbox_test.go index 81e8ca990ee..23c30b086ed 100644 --- a/pkg/client/unversioned/helper_blackbox_test.go +++ b/pkg/client/unversioned/helper_blackbox_test.go @@ -25,6 +25,7 @@ import ( "testing" "k8s.io/kubernetes/pkg/api/testapi" + unversioned_api "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/fake" ) @@ -89,10 +90,10 @@ func TestNegotiateVersion(t *testing.T) { Codec: codec, Resp: &http.Response{ StatusCode: 200, - Body: objBody(&unversioned.APIVersions{Versions: test.serverVersions}), + Body: objBody(&unversioned_api.APIVersions{Versions: test.serverVersions}), }, Client: fake.HTTPClientFunc(func(req *http.Request) (*http.Response, error) { - return &http.Response{StatusCode: 200, Body: objBody(&unversioned.APIVersions{Versions: test.serverVersions})}, nil + return &http.Response{StatusCode: 200, Body: objBody(&unversioned_api.APIVersions{Versions: test.serverVersions})}, nil }), } c := unversioned.NewOrDie(test.config) From 4c9b88a3c2ba8807b33c3d86ce4f5959ef48b5c7 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Thu, 8 Oct 2015 21:03:33 -0700 Subject: [PATCH 12/15] combine types.go and unversioned.go --- pkg/api/unversioned/types.go | 85 +++++++++++++++++++++++ pkg/api/unversioned/unversioned.go | 106 ----------------------------- 2 files changed, 85 insertions(+), 106 deletions(-) delete mode 100644 pkg/api/unversioned/unversioned.go diff --git a/pkg/api/unversioned/types.go b/pkg/api/unversioned/types.go index 816f324834f..809c5851882 100644 --- a/pkg/api/unversioned/types.go +++ b/pkg/api/unversioned/types.go @@ -17,6 +17,8 @@ limitations under the License. // Package unversioned contains API types that are common to all versions. package unversioned +import "strings" + // TypeMeta describes an individual object in an API response or request // with strings representing the type of the object and its API schema version. // Structures that are versioned or persisted should inline TypeMeta. @@ -269,3 +271,86 @@ const ( ) func (*Status) IsAnAPIObject() {} + +// APIVersions lists the versions that are available, to allow clients to +// discover the API at /api, which is the root path of the legacy v1 API. +type APIVersions struct { + // versions are the api versions that are available. + Versions []string `json:"versions"` +} + +// APIGroupList is a list of APIGroup, to allow clients to discover the API at +// /apis. +type APIGroupList struct { + // groups is a list of APIGroup. + Groups []APIGroup `json:"groups"` +} + +// APIGroup contains the name, the supported versions, and the preferred version +// of a group. +type APIGroup struct { + // name is the name of the group. + Name string `json:"name"` + // versions are the versions supported in this group. + Versions []GroupVersion `json:"versions"` + // preferredVersion is the version preferred by the API server, which + // probably is the storage version. + PreferredVersion GroupVersion `json:"preferredVersion,omitempty"` +} + +// GroupVersion contains the "group/version" and "version" string of a version. +// It is made a struct to keep extensiblity. +type GroupVersion struct { + // groupVersion specifies the API group and version in the form "group/version" + GroupVersion string `json:"groupVersion"` + // version specifies the version in the form of "version". This is to save + // the clients the trouble of splitting the GroupVersion. + Version string `json:"version"` +} + +// APIResource specifies the name of a resource and whether it is namespaced. +type APIResource struct { + // name is the name of the resource. + Name string `json:"name"` + // namespaced indicates if a resource is namespaced or not. + Namespaced bool `json:"namespaced"` +} + +// APIResourceList is a list of APIResource, it is used to expose the name of the +// resources supported in a specific group and version, and if the resource +// is namespaced. +type APIResourceList struct { + // groupVersion is the group and version this APIResourceList is for. + GroupVersion string `json:"groupVersion"` + // resources contains the name of the resources and if they are namespaced. + APIResources []APIResource `json:"resources"` +} + +// RootPaths lists the paths available at root. +// For example: "/healthz", "/apis". +type RootPaths struct { + // paths are the paths available at root. + Paths []string `json:"paths"` +} + +// TODO: remove me when watch is refactored +func LabelSelectorQueryParam(version string) string { + return "labelSelector" +} + +// TODO: remove me when watch is refactored +func FieldSelectorQueryParam(version string) string { + return "fieldSelector" +} + +// String returns available api versions as a human-friendly version string. +func (apiVersions APIVersions) String() string { + return strings.Join(apiVersions.Versions, ",") +} + +func (apiVersions APIVersions) GoString() string { + return apiVersions.String() +} + +// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. +type Patch struct{} diff --git a/pkg/api/unversioned/unversioned.go b/pkg/api/unversioned/unversioned.go deleted file mode 100644 index a885ecab23d..00000000000 --- a/pkg/api/unversioned/unversioned.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package unversioned - -import ( - "strings" -) - -// This file contains API types that are unversioned. - -// APIVersions lists the versions that are available, to allow clients to -// discover the API at /api, which is the root path of the legacy v1 API. -type APIVersions struct { - // versions are the api versions that are available. - Versions []string `json:"versions"` -} - -// APIGroupList is a list of APIGroup, to allow clients to discover the API at -// /apis. -type APIGroupList struct { - // groups is a list of APIGroup. - Groups []APIGroup `json:"groups"` -} - -// APIGroup contains the name, the supported versions, and the preferred version -// of a group. -type APIGroup struct { - // name is the name of the group. - Name string `json:"name"` - // versions are the versions supported in this group. - Versions []GroupVersion `json:"versions"` - // preferredVersion is the version preferred by the API server, which - // probably is the storage version. - PreferredVersion GroupVersion `json:"preferredVersion,omitempty"` -} - -// GroupVersion contains the "group/version" and "version" string of a version. -// It is made a struct to keep extensiblity. -type GroupVersion struct { - // groupVersion specifies the API group and version in the form "group/version" - GroupVersion string `json:"groupVersion"` - // version specifies the version in the form of "version". This is to save - // the clients the trouble of splitting the GroupVersion. - Version string `json:"version"` -} - -// APIResource specifies the name of a resource and whether it is namespaced. -type APIResource struct { - // name is the name of the resource. - Name string `json:"name"` - // namespaced indicates if a resource is namespaced or not. - Namespaced bool `json:"namespaced"` -} - -// APIResourceList is a list of APIResource, it is used to expose the name of the -// resources supported in a specific group and version, and if the resource -// is namespaced. -type APIResourceList struct { - // groupVersion is the group and version this APIResourceList is for. - GroupVersion string `json:"groupVersion"` - // resources contains the name of the resources and if they are namespaced. - APIResources []APIResource `json:"resources"` -} - -// RootPaths lists the paths available at root. -// For example: "/healthz", "/apis". -type RootPaths struct { - // paths are the paths available at root. - Paths []string `json:"paths"` -} - -// TODO: remove me when watch is refactored -func LabelSelectorQueryParam(version string) string { - return "labelSelector" -} - -// TODO: remove me when watch is refactored -func FieldSelectorQueryParam(version string) string { - return "fieldSelector" -} - -// String returns available api versions as a human-friendly version string. -func (apiVersions APIVersions) String() string { - return strings.Join(apiVersions.Versions, ",") -} - -func (apiVersions APIVersions) GoString() string { - return apiVersions.String() -} - -// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. -type Patch struct{} From 75543311852b06167a62213fc74bf72ab407e66a Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Fri, 9 Oct 2015 10:41:54 -0700 Subject: [PATCH 13/15] update swagger --- api/swagger-spec/v1.json | 33 ++++---- .../types_swagger_doc_generated.go | 76 +++++++++++++++++++ 2 files changed, 93 insertions(+), 16 deletions(-) diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json index 257d8b47eb3..fcc70ea0331 100644 --- a/api/swagger-spec/v1.json +++ b/api/swagger-spec/v1.json @@ -560,7 +560,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -1184,7 +1184,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -1808,7 +1808,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -2392,7 +2392,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -2920,7 +2920,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -3761,7 +3761,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -4404,7 +4404,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -4921,7 +4921,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -7088,7 +7088,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -7712,7 +7712,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -8395,7 +8395,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -9078,7 +9078,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -9702,7 +9702,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -10326,7 +10326,7 @@ "allowMultiple": false }, { - "type": "api.Patch", + "type": "unversioned.Patch", "paramType": "body", "name": "body", "description": "", @@ -11414,8 +11414,9 @@ } } }, - "api.Patch": { - "id": "api.Patch", + "unversioned.Patch": { + "id": "unversioned.Patch", + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "properties": {} }, "unversioned.Status": { diff --git a/pkg/api/unversioned/types_swagger_doc_generated.go b/pkg/api/unversioned/types_swagger_doc_generated.go index cc10ee12f62..cf9ad3f41b2 100644 --- a/pkg/api/unversioned/types_swagger_doc_generated.go +++ b/pkg/api/unversioned/types_swagger_doc_generated.go @@ -27,6 +27,65 @@ package unversioned // Those methods can be generated by using hack/update-generated-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE +var map_APIGroup = map[string]string{ + "": "APIGroup contains the name, the supported versions, and the preferred version of a group.", + "name": "name is the name of the group.", + "versions": "versions are the versions supported in this group.", + "preferredVersion": "preferredVersion is the version preferred by the API server, which probably is the storage version.", +} + +func (APIGroup) SwaggerDoc() map[string]string { + return map_APIGroup +} + +var map_APIGroupList = map[string]string{ + "": "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + "groups": "groups is a list of APIGroup.", +} + +func (APIGroupList) SwaggerDoc() map[string]string { + return map_APIGroupList +} + +var map_APIResource = map[string]string{ + "": "APIResource specifies the name of a resource and whether it is namespaced.", + "name": "name is the name of the resource.", + "namespaced": "namespaced indicates if a resource is namespaced or not.", +} + +func (APIResource) SwaggerDoc() map[string]string { + return map_APIResource +} + +var map_APIResourceList = map[string]string{ + "": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "groupVersion": "groupVersion is the group and version this APIResourceList is for.", + "resources": "resources contains the name of the resources and if they are namespaced.", +} + +func (APIResourceList) SwaggerDoc() map[string]string { + return map_APIResourceList +} + +var map_APIVersions = map[string]string{ + "": "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + "versions": "versions are the api versions that are available.", +} + +func (APIVersions) SwaggerDoc() map[string]string { + return map_APIVersions +} + +var map_GroupVersion = map[string]string{ + "": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensiblity.", + "groupVersion": "groupVersion specifies the API group and version in the form \"group/version\"", + "version": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", +} + +func (GroupVersion) SwaggerDoc() map[string]string { + return map_GroupVersion +} + var map_ListMeta = map[string]string{ "": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.", @@ -37,6 +96,23 @@ func (ListMeta) SwaggerDoc() map[string]string { return map_ListMeta } +var map_Patch = map[string]string{ + "": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", +} + +func (Patch) SwaggerDoc() map[string]string { + return map_Patch +} + +var map_RootPaths = map[string]string{ + "": "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", + "paths": "paths are the paths available at root.", +} + +func (RootPaths) SwaggerDoc() map[string]string { + return map_RootPaths +} + var map_Status = map[string]string{ "": "Status is a return value for calls that don't return other objects.", "metadata": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", From 94d68296bebb083e9104a91948edd1479b562e83 Mon Sep 17 00:00:00 2001 From: Chao Xu Date: Fri, 9 Oct 2015 10:43:56 -0700 Subject: [PATCH 14/15] update html in api-reference --- docs/api-reference/definitions.html | 750 ++-- docs/api-reference/operations.html | 6465 ++++++++++++++------------- 2 files changed, 3744 insertions(+), 3471 deletions(-) diff --git a/docs/api-reference/definitions.html b/docs/api-reference/definitions.html index 819d6c23449..657ef1810bc 100644 --- a/docs/api-reference/definitions.html +++ b/docs/api-reference/definitions.html @@ -409,9 +409,6 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

v1.Binding

  • -

    v1.Status

    -
  • -
  • v1.Event

  • @@ -500,14 +497,14 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -562,14 +559,14 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -578,7 +575,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -913,6 +910,58 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } + +
    +

    unversioned.StatusCause

    +
    +

    StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    reason

    A machine-readable description of the cause of the error. If this value is empty there is no information available.

    false

    string

    message

    A human-readable description of the cause of the error. This field may be presented as-is to a reader.

    false

    string

    field

    The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
    +
    +Examples:
    + "name" - the field "name" on the current resource
    + "items[0].name" - the field "name" on the first array entry in "items"

    false

    string

    +

    v1.GCEPersistentDiskVolumeSource

    @@ -1099,14 +1148,14 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -1209,14 +1258,14 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -1225,7 +1274,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -1415,14 +1464,14 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -1431,7 +1480,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -1838,14 +1887,14 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -1854,7 +1903,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -1893,14 +1942,14 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -1955,14 +2004,14 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -1971,7 +2020,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -2010,14 +2059,14 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -2113,14 +2162,14 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -2151,9 +2200,9 @@ Populated by the system when a graceful deletion is requested. Read-only. More i
    -

    v1.ListMeta

    +

    v1.FlockerVolumeSource

    -

    ListMeta describes metadata that synthetic resources must have, including lists and various status objects.

    +

    FlockerVolumeSource represents a Flocker volume mounted by the Flocker agent.

    @@ -2174,16 +2223,9 @@ Populated by the system when a graceful deletion is requested. Read-only. More i - - - - - - - - - - + + + @@ -2231,6 +2273,47 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    selfLink

    SelfLink is a URL representing this object. Populated by the system. Read-only.

    false

    string

    resourceVersion

    String that identifies the server’s internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency

    false

    datasetName

    Required: the volume name. This is going to be store on metadata → name on the payload for Flocker

    true

    string

    +
    +
    +

    unversioned.ListMeta

    +
    +

    ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    selfLink

    SelfLink is a URL representing this object. Populated by the system. Read-only.

    false

    string

    resourceVersion

    String that identifies the server’s internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency

    false

    string

    +

    v1.ResourceQuotaList

    @@ -2257,14 +2340,14 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -2273,7 +2356,7 @@ Populated by the system when a graceful deletion is requested. Read-only. More i

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -2367,7 +2450,14 @@ The resulting set of endpoints can be viewed as:

    addresses

    -

    IP addresses which offer the related ports.

    +

    IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.

    +

    false

    +

    v1.EndpointAddress array

    + + + +

    notReadyAddresses

    +

    IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.

    false

    v1.EndpointAddress array

    @@ -2517,14 +2607,14 @@ The resulting set of endpoints can be viewed as:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -2579,14 +2669,14 @@ The resulting set of endpoints can be viewed as:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -2595,7 +2685,7 @@ The resulting set of endpoints can be viewed as:

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -2634,14 +2724,14 @@ The resulting set of endpoints can be viewed as:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -2650,7 +2740,7 @@ The resulting set of endpoints can be viewed as:

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -2700,14 +2790,14 @@ The resulting set of endpoints can be viewed as:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -2721,7 +2811,7 @@ The resulting set of endpoints can be viewed as:

    subsets

    -

    The set of all endpoints is the union of all subsets. Sets of addresses and ports that comprise a service.

    +

    The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.

    true

    v1.EndpointSubset array

    @@ -2755,14 +2845,14 @@ The resulting set of endpoints can be viewed as:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -2900,12 +2990,26 @@ The resulting set of endpoints can be viewed as:
    +

    flocker

    +

    Flocker represents a Flocker volume attached to a kubelet’s host machine. This depends on the Flocker control service being running

    +

    false

    +

    v1.FlockerVolumeSource

    + + +

    downwardAPI

    DownwardAPI represents downward API about the pod that should populate this volume

    false

    v1.DownwardAPIVolumeSource

    + +

    fc

    +

    FC represents a Fibre Channel resource that is attached to a kubelet’s host machine and then exposed to the pod.

    +

    false

    +

    v1.FCVolumeSource

    + + @@ -2997,14 +3101,14 @@ The resulting set of endpoints can be viewed as:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -3063,14 +3167,14 @@ The resulting set of endpoints can be viewed as:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -3312,7 +3416,21 @@ The resulting set of endpoints can be viewed as:

    hostNetwork

    -

    Host networking requested for this pod. Uses the host’s network namespace. If this option is set, the ports that will be used must be specified. Default to false.

    +

    Host networking requested for this pod. Use the host’s network namespace. If this option is set, the ports that will be used must be specified. Default to false.

    +

    false

    +

    boolean

    +

    false

    + + +

    hostPID

    +

    Use the host’s pid namespace. Optional: Default to false.

    +

    false

    +

    boolean

    +

    false

    + + +

    hostIPC

    +

    Use the host’s ipc namespace. Optional: Default to false.

    false

    boolean

    false

    @@ -3415,14 +3533,14 @@ The resulting set of endpoints can be viewed as:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -3477,14 +3595,14 @@ The resulting set of endpoints can be viewed as:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -3493,7 +3611,7 @@ The resulting set of endpoints can be viewed as:

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -3801,58 +3919,6 @@ The resulting set of endpoints can be viewed as:
    -
    -
    -

    v1.StatusCause

    -
    -

    StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.

    -
    - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescriptionRequiredSchemaDefault

    reason

    A machine-readable description of the cause of the error. If this value is empty there is no information available.

    false

    string

    message

    A human-readable description of the cause of the error. This field may be presented as-is to a reader.

    false

    string

    field

    The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors.
    -
    -Examples:
    - "name" - the field "name" on the current resource
    - "items[0].name" - the field "name" on the first array entry in "items"

    false

    string

    -

    v1.PodCondition

    @@ -3891,6 +3957,34 @@ Examples:

    string

    + +

    lastProbeTime

    +

    Last time we probed the condition.

    +

    false

    +

    string

    + + + +

    lastTransitionTime

    +

    Last time the condition transitioned from one status to another.

    +

    false

    +

    string

    + + + +

    reason

    +

    Unique, one-word, CamelCase reason for the condition’s last transition.

    +

    false

    +

    string

    + + + +

    message

    +

    Human-readable message indicating details about last transition.

    +

    false

    +

    string

    + + @@ -3977,89 +4071,6 @@ Examples:
    -
    -
    -

    v1.Status

    -
    -

    Status is a return value for calls that don’t return other objects.

    -
    - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescriptionRequiredSchemaDefault

    kind

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    v1.ListMeta

    status

    Status of the operation. One of: "Success" or "Failure". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status

    false

    string

    message

    A human-readable description of the status of this operation.

    false

    string

    reason

    A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.

    false

    string

    details

    Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.

    false

    v1.StatusDetails

    code

    Suggested HTTP return code for this status, 0 if not set.

    false

    integer (int32)

    -

    v1.PodTemplate

    @@ -4086,14 +4097,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -4197,6 +4208,61 @@ Examples:
    +
    +
    +

    v1.FCVolumeSource

    +
    +

    A Fibre Channel Disk can only be mounted as read/write once.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    targetWWNs

    Required: FC target world wide names (WWNs)

    true

    string array

    lun

    Required: FC target lun number

    true

    integer (int32)

    fsType

    Required: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs"

    true

    string

    readOnly

    Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.

    false

    boolean

    false

    +

    v1.EndpointPort

    @@ -4279,6 +4345,61 @@ Examples:
    +
    +
    +

    unversioned.StatusDetails

    +
    +

    StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    name

    The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).

    false

    string

    kind

    The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    causes

    The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.

    false

    unversioned.StatusCause array

    retryAfterSeconds

    If specified, the time in seconds before the operation should be retried.

    false

    integer (int32)

    +

    v1.HTTPGetAction

    @@ -4334,61 +4455,6 @@ Examples:
    -
    -
    -

    v1.StatusDetails

    -
    -

    StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.

    -
    - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameDescriptionRequiredSchemaDefault

    name

    The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).

    false

    string

    kind

    The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    causes

    The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.

    false

    v1.StatusCause array

    retryAfterSeconds

    If specified, the time in seconds before the operation should be retried.

    false

    integer (int32)

    -

    v1.LoadBalancerStatus

    @@ -4449,14 +4515,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -4465,7 +4531,7 @@ Examples:

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -4671,7 +4737,7 @@ Examples:

    hostPath

    -

    HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for development and testing only. On-host storage is not supported in any way. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath

    +

    HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: http://releases.k8s.io/HEAD/docs/user-guide/volumes.md#hostpath

    false

    v1.HostPathVolumeSource

    @@ -4719,6 +4785,20 @@ Examples:
    +

    fc

    +

    FC represents a Fibre Channel resource that is attached to a kubelet’s host machine and then exposed to the pod.

    +

    false

    +

    v1.FCVolumeSource

    + + + +

    flocker

    +

    Flocker represents a Flocker volume attached to a kubelet’s host machine and exposed to the pod for its usage. This depends on the Flocker control service being running

    +

    false

    +

    v1.FlockerVolumeSource

    + + +

    accessModes

    AccessModes contains all ways the volume can be mounted. More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#access-modes

    false

    @@ -4930,14 +5010,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -4946,7 +5026,7 @@ Examples:

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -5057,14 +5137,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -5487,14 +5567,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -5503,7 +5583,7 @@ Examples:

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -5576,14 +5656,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -5638,14 +5718,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -5828,14 +5908,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -5993,14 +6073,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -6009,7 +6089,7 @@ Examples:

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -6048,14 +6128,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -6064,7 +6144,7 @@ Examples:

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -6103,14 +6183,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -6119,7 +6199,7 @@ Examples:

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    -

    v1.ListMeta

    +

    unversioned.ListMeta

    @@ -6208,6 +6288,89 @@ Examples:
    +
    +
    +

    unversioned.Status

    +
    +

    Status is a return value for calls that don’t return other objects.

    +
    + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescriptionRequiredSchemaDefault

    kind

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    metadata

    Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    unversioned.ListMeta

    status

    Status of the operation. One of: "Success" or "Failure". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status

    false

    string

    message

    A human-readable description of the status of this operation.

    false

    string

    reason

    A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.

    false

    string

    details

    Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.

    false

    unversioned.StatusDetails

    code

    Suggested HTTP return code for this status, 0 if not set.

    false

    integer (int32)

    +

    v1.ContainerStateWaiting

    @@ -6386,7 +6549,14 @@ Examples:

    externalIPs

    -

    ExternalIPs are used by external load balancers, or can be set by users to handle external traffic that arrives at a node. Externally visible IPs (e.g. load balancers) that should be proxied to this service.

    +

    externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. A previous form of this functionality exists as the deprecatedPublicIPs field. When using this field, callers should also clear the deprecatedPublicIPs field.

    +

    false

    +

    string array

    + + + +

    deprecatedPublicIPs

    +

    deprecatedPublicIPs is deprecated and replaced by the externalIPs field with almost the exact same semantics. This field is retained in the v1 API for compatibility until at least 8/20/2016. It will be removed from any new API revisions. If both deprecatedPublicIPs and externalIPs are set, deprecatedPublicIPs is used.

    false

    string array

    @@ -6434,14 +6604,14 @@ Examples:

    kind

    -

    A string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    +

    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

    false

    string

    apiVersion

    -

    APIVersion defines the version of the schema of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    +

    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

    false

    string

    @@ -6612,7 +6782,7 @@ Examples:
    diff --git a/docs/api-reference/operations.html b/docs/api-reference/operations.html index 5e78f1a539c..8764ea95851 100644 --- a/docs/api-reference/operations.html +++ b/docs/api-reference/operations.html @@ -4,7 +4,7 @@ -Paths +Operations