Update kubectl describe pod to use pod level qos

This commit is contained in:
derekwaynecarr
2016-05-31 11:04:46 -04:00
parent 9023955bb7
commit 89ff3b2530
3 changed files with 2 additions and 23 deletions

View File

@@ -540,6 +540,7 @@ func describePod(pod *api.Pod, events *api.EventList) (string, error) {
}
}
describeVolumes(pod.Spec.Volumes, out, "")
fmt.Fprintf(out, "QoS Tier:\t%s\n", qosutil.GetPodQos(pod))
if events != nil {
DescribeEvents(events, out)
}
@@ -843,15 +844,6 @@ func describeContainers(label string, containers []api.Container, containerStatu
}
}
resourceToQoS := qosutil.GetQoS(&container)
if len(resourceToQoS) > 0 {
fmt.Fprintf(out, " QoS Tier:\n")
}
for _, resource := range SortedQoSResourceNames(resourceToQoS) {
qos := resourceToQoS[resource]
fmt.Fprintf(out, " %s:\t%s\n", resource, qos)
}
resources := container.Resources
if len(resources.Limits) > 0 {
fmt.Fprintf(out, " Limits:\n")

View File

@@ -238,19 +238,6 @@ func TestDescribeContainers(t *testing.T) {
},
expectedElements: []string{"test", "State", "Waiting", "Ready", "True", "Restart Count", "7", "Image", "image", "time", "1000"},
},
// QoS classes
{
container: api.Container{
Name: "test",
Image: "image",
},
status: api.ContainerStatus{
Name: "test",
Ready: true,
RestartCount: 7,
},
expectedElements: []string{"cpu", "BestEffort", "memory", "BestEffort"},
},
// Using limits.
{
container: api.Container{

View File

@@ -508,8 +508,8 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
{"IP:"},
{"Controllers:", "ReplicationController/redis-master"},
{"Image:", redisImage},
{"cpu:", "BestEffort"},
{"State:", "Running"},
{"QoS Tier:", "BestEffort"},
}
checkOutput(output, requiredStrings)
})