Don't validate selector that is already validated

This commit is contained in:
Wojciech Tyczynski
2016-08-19 09:36:55 +02:00
parent 42aee3ac5e
commit e9d5be628a
8 changed files with 18 additions and 20 deletions

View File

@@ -472,7 +472,7 @@ func (r RealPodControl) createPods(nodeName, namespace string, template *api.Pod
if len(nodeName) != 0 {
pod.Spec.NodeName = nodeName
}
if labels.Set(pod.Labels).AsSelector().Empty() {
if labels.Set(pod.Labels).AsSelectorPreValidated().Empty() {
return fmt.Errorf("unable to create pods, no labels")
}
if newPod, err := r.KubeClient.Core().Pods(namespace).Create(pod); err != nil {