Merge pull request #125631 from SergeyKanzhelev/logFailedAdmission
improve logging of pod admission denied
This commit is contained in:
@@ -2275,6 +2275,9 @@ func (kl *Kubelet) canAdmitPod(pods []*v1.Pod, pod *v1.Pod) (bool, string, strin
|
||||
}
|
||||
for _, podAdmitHandler := range kl.admitHandlers {
|
||||
if result := podAdmitHandler.Admit(attrs); !result.Admit {
|
||||
|
||||
klog.InfoS("Pod admission denied", "podUID", attrs.Pod.UID, "pod", klog.KObj(attrs.Pod), "reason", result.Reason, "message", result.Message)
|
||||
|
||||
return false, result.Reason, result.Message
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user