Commit d41737ef authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #15689 from caesarxuchao/default-ns-componentstatus

Auto commit by PR queue bot
parents e12019c6 d6223a8b
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
] ]
}, },
{ {
"path": "/api/v1/namespaces/{namespace}/componentstatuses", "path": "/api/v1/componentstatuses",
"description": "API at /api/v1", "description": "API at /api/v1",
"operations": [ "operations": [
{ {
...@@ -104,14 +104,6 @@ ...@@ -104,14 +104,6 @@
"description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.",
"required": false, "required": false,
"allowMultiple": false "allowMultiple": false
},
{
"type": "string",
"paramType": "path",
"name": "namespace",
"description": "object name and auth scope, such as for teams and projects",
"required": true,
"allowMultiple": false
} }
], ],
"responseMessages": [ "responseMessages": [
...@@ -131,7 +123,7 @@ ...@@ -131,7 +123,7 @@
] ]
}, },
{ {
"path": "/api/v1/namespaces/{namespace}/componentstatuses/{name}", "path": "/api/v1/componentstatuses/{name}",
"description": "API at /api/v1", "description": "API at /api/v1",
"operations": [ "operations": [
{ {
...@@ -151,14 +143,6 @@ ...@@ -151,14 +143,6 @@
{ {
"type": "string", "type": "string",
"paramType": "path", "paramType": "path",
"name": "namespace",
"description": "object name and auth scope, such as for teams and projects",
"required": true,
"allowMultiple": false
},
{
"type": "string",
"paramType": "path",
"name": "name", "name": "name",
"description": "name of the ComponentStatus", "description": "name of the ComponentStatus",
"required": true, "required": true,
...@@ -182,73 +166,6 @@ ...@@ -182,73 +166,6 @@
] ]
}, },
{ {
"path": "/api/v1/componentstatuses",
"description": "API at /api/v1",
"operations": [
{
"type": "v1.ComponentStatusList",
"method": "GET",
"summary": "list objects of kind ComponentStatus",
"nickname": "listComponentStatus",
"parameters": [
{
"type": "string",
"paramType": "query",
"name": "pretty",
"description": "If 'true', then the output is pretty printed.",
"required": false,
"allowMultiple": false
},
{
"type": "string",
"paramType": "query",
"name": "labelSelector",
"description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
"required": false,
"allowMultiple": false
},
{
"type": "string",
"paramType": "query",
"name": "fieldSelector",
"description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
"required": false,
"allowMultiple": false
},
{
"type": "boolean",
"paramType": "query",
"name": "watch",
"description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
"required": false,
"allowMultiple": false
},
{
"type": "string",
"paramType": "query",
"name": "resourceVersion",
"description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.",
"required": false,
"allowMultiple": false
}
],
"responseMessages": [
{
"code": 200,
"message": "OK",
"responseModel": "v1.ComponentStatusList"
}
],
"produces": [
"application/json"
],
"consumes": [
"*/*"
]
}
]
},
{
"path": "/api/v1/namespaces/{namespace}/endpoints", "path": "/api/v1/namespaces/{namespace}/endpoints",
"description": "API at /api/v1", "description": "API at /api/v1",
"operations": [ "operations": [
......
...@@ -77,6 +77,7 @@ func init() { ...@@ -77,6 +77,7 @@ func init() {
"Minion", "Minion",
"Namespace", "Namespace",
"PersistentVolume", "PersistentVolume",
"ComponentStatus",
) )
// these kinds should be excluded from the list of resources // these kinds should be excluded from the list of resources
......
...@@ -90,21 +90,21 @@ func testComponentStatusData() *api.ComponentStatusList { ...@@ -90,21 +90,21 @@ func testComponentStatusData() *api.ComponentStatusList {
Conditions: []api.ComponentCondition{ Conditions: []api.ComponentCondition{
{Type: api.ComponentHealthy, Status: api.ConditionTrue, Message: "ok", Error: "nil"}, {Type: api.ComponentHealthy, Status: api.ConditionTrue, Message: "ok", Error: "nil"},
}, },
ObjectMeta: api.ObjectMeta{Name: "servergood", Namespace: "test"}, ObjectMeta: api.ObjectMeta{Name: "servergood"},
} }
bad := api.ComponentStatus{ bad := api.ComponentStatus{
Conditions: []api.ComponentCondition{ Conditions: []api.ComponentCondition{
{Type: api.ComponentHealthy, Status: api.ConditionFalse, Message: "", Error: "bad status: 500"}, {Type: api.ComponentHealthy, Status: api.ConditionFalse, Message: "", Error: "bad status: 500"},
}, },
ObjectMeta: api.ObjectMeta{Name: "serverbad", Namespace: "test"}, ObjectMeta: api.ObjectMeta{Name: "serverbad"},
} }
unknown := api.ComponentStatus{ unknown := api.ComponentStatus{
Conditions: []api.ComponentCondition{ Conditions: []api.ComponentCondition{
{Type: api.ComponentHealthy, Status: api.ConditionUnknown, Message: "", Error: "fizzbuzz error"}, {Type: api.ComponentHealthy, Status: api.ConditionUnknown, Message: "", Error: "fizzbuzz error"},
}, },
ObjectMeta: api.ObjectMeta{Name: "serverunknown", Namespace: "test"}, ObjectMeta: api.ObjectMeta{Name: "serverunknown"},
} }
return &api.ComponentStatusList{ return &api.ComponentStatusList{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment