mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Added integration test for pod affinity namespace selector
This commit is contained in:
@@ -497,3 +497,13 @@ func podScheduled(c clientset.Interface, podNamespace, podName string) wait.Cond
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
||||
func createNamespacesWithLabels(cs clientset.Interface, namespaces []string, labels map[string]string) error {
|
||||
for _, n := range namespaces {
|
||||
ns := v1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: n, Labels: labels}}
|
||||
if _, err := cs.CoreV1().Namespaces().Create(context.TODO(), &ns, metav1.CreateOptions{}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user