mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Fix kubelet's PodAdmitResult's message
This commit is contained in:
parent
6f053ec4bc
commit
dbb715eb42
@ -84,7 +84,7 @@ func (w *predicateAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult
|
||||
glog.V(2).Infof("Predicate failed on Pod: %v, for reason: %v", format.Pod(pod), message)
|
||||
case *predicates.InsufficientResourceError:
|
||||
reason = fmt.Sprintf("OutOf%s", re.ResourceName)
|
||||
message := re.Error()
|
||||
message = re.Error()
|
||||
glog.V(2).Infof("Predicate failed on Pod: %v, for reason: %v", format.Pod(pod), message)
|
||||
case *predicates.FailureReason:
|
||||
reason = re.GetReason()
|
||||
@ -92,7 +92,7 @@ func (w *predicateAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult
|
||||
glog.V(2).Infof("Predicate failed on Pod: %v, for reason: %v", format.Pod(pod), message)
|
||||
default:
|
||||
reason = "UnexpectedPredicateFailureType"
|
||||
message := fmt.Sprintf("GeneralPredicates failed due to %v, which is unexpected.", r)
|
||||
message = fmt.Sprintf("GeneralPredicates failed due to %v, which is unexpected.", r)
|
||||
glog.Warningf("Failed to admit pod %v - %s", format.Pod(pod), message)
|
||||
}
|
||||
return PodAdmitResult{
|
||||
|
Loading…
Reference in New Issue
Block a user