Fix kubectl drain --dry-run=server

Adds missing type meta to PodDelete items
This commit is contained in:
Katrina Verey 2021-03-12 16:26:48 -08:00
parent 0ed8ee6fd7
commit ff9ada1b55

View File

@ -220,6 +220,8 @@ func filterPods(podList *corev1.PodList, filters []PodFilter) *PodDeleteList {
// Add the pod to PodDeleteList no matter what PodDeleteStatus is,
// those pods whose PodDeleteStatus is false like DaemonSet will
// be catched by list.errors()
pod.Kind = "Pod"
pod.APIVersion = "v1"
pods = append(pods, PodDelete{
Pod: pod,
Status: status,