Skip to content

Commit 31f751c

Browse files
author
caiweidong
committed
Kubectl describe xxx suport PriorityClassName
1 parent 1192ca0 commit 31f751c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/kubectl/describe/versioned/describe.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,9 @@ func describePod(pod *corev1.Pod, events *corev1.EventList) (string, error) {
735735
} else {
736736
w.Write(LEVEL_0, "QoS Class:\t%s\n", qos.GetPodQOS(pod))
737737
}
738+
if len(pod.Spec.PriorityClassName) > 0 {
739+
w.Write(LEVEL_0, "Priority Class Name:\t%s\n", pod.Spec.PriorityClassName)
740+
}
738741
printLabelsMultiline(w, "Node-Selectors", pod.Spec.NodeSelector)
739742
printPodTolerationsMultiline(w, "Tolerations", pod.Spec.Tolerations)
740743
if events != nil {
@@ -1964,6 +1967,9 @@ func DescribePodTemplate(template *corev1.PodTemplateSpec, w PrefixWriter) {
19641967
}
19651968
describeContainers("Containers", template.Spec.Containers, nil, nil, w, " ")
19661969
describeVolumes(template.Spec.Volumes, w, " ")
1970+
if len(template.Spec.PriorityClassName) > 0 {
1971+
w.Write(LEVEL_1, "Priority Class Name:\t%s\n", template.Spec.PriorityClassName)
1972+
}
19671973
}
19681974

19691975
// ReplicaSetDescriber generates information about a ReplicaSet and the pods it has created.

0 commit comments

Comments
 (0)