Commit 262825f1 authored by Chao Xu's avatar Chao Xu

make componenetstatus root scoped

parent dc685dfe
...@@ -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