mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Merge pull request #15689 from caesarxuchao/default-ns-componentstatus
Auto commit by PR queue bot
This commit is contained in:
commit
d41737eff2
@ -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 @@
|
|||||||
"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 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "/api/v1/namespaces/{namespace}/componentstatuses/{name}",
|
"path": "/api/v1/componentstatuses/{name}",
|
||||||
"description": "API at /api/v1",
|
"description": "API at /api/v1",
|
||||||
"operations": [
|
"operations": [
|
||||||
{
|
{
|
||||||
@ -148,14 +140,6 @@
|
|||||||
"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
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"paramType": "path",
|
"paramType": "path",
|
||||||
@ -181,73 +165,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",
|
||||||
|
@ -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 {
|
|||||||
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{
|
||||||
|
Loading…
Reference in New Issue
Block a user