mirror of https://github.com/k3s-io/k3s
Merge pull request #76781 from cwdsuzhou/priorityClass
Support describe priority class of pod, rs, sts...k3s-v1.15.3
commit
ac1557a886
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue