Change taint/toleration annotations to api fields.

This commit is contained in:
Avesh Agarwal
2017-02-20 11:43:05 -05:00
parent eef16cf141
commit 9b640838a5
22 changed files with 116 additions and 378 deletions

View File

@@ -1160,13 +1160,8 @@ func PodToleratesNodeTaints(pod *v1.Pod, meta interface{}, nodeInfo *schedulerca
return false, nil, err
}
tolerations, err := v1.GetTolerationsFromPodAnnotations(pod.Annotations)
if err != nil {
return false, nil, err
}
if v1.TolerationsTolerateTaintsWithFilter(tolerations, taints, func(t *v1.Taint) bool {
// PodToleratesNodeTaints is only interested in NoSchedule and NoExecute taints.
if v1.TolerationsTolerateTaintsWithFilter(pod.Spec.Tolerations, taints, func(t *v1.Taint) bool {
// PodToleratesNodeTaints is only interested in NoSchedule taints.
return t.Effect == v1.TaintEffectNoSchedule || t.Effect == v1.TaintEffectNoExecute
}) {
return true, nil, nil