Merge pull request #76781 from cwdsuzhou/priorityClass

Support describe priority class of pod, rs, sts...
k3s-v1.15.3
Kubernetes Prow Robot 2019-04-19 09:48:10 -07:00 committed by GitHub
commit ac1557a886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -735,6 +735,9 @@ func describePod(pod *corev1.Pod, events *corev1.EventList) (string, error) {
} else {
w.Write(LEVEL_0, "QoS Class:\t%s\n", qos.GetPodQOS(pod))
}
if len(pod.Spec.PriorityClassName) > 0 {
w.Write(LEVEL_0, "Priority Class Name:\t%s\n", pod.Spec.PriorityClassName)
}
printLabelsMultiline(w, "Node-Selectors", pod.Spec.NodeSelector)
printPodTolerationsMultiline(w, "Tolerations", pod.Spec.Tolerations)
if events != nil {
@ -1964,6 +1967,9 @@ func DescribePodTemplate(template *corev1.PodTemplateSpec, w PrefixWriter) {
}
describeContainers("Containers", template.Spec.Containers, nil, nil, w, " ")
describeVolumes(template.Spec.Volumes, w, " ")
if len(template.Spec.PriorityClassName) > 0 {
w.Write(LEVEL_1, "Priority Class Name:\t%s\n", template.Spec.PriorityClassName)
}
}
// ReplicaSetDescriber generates information about a ReplicaSet and the pods it has created.