Formatting feedback and fix.

This commit is contained in:
Aleksandr Melnikov
2020-09-21 16:12:53 -07:00
parent 48e2050e97
commit 9ec45e4f34

View File

@@ -391,12 +391,14 @@ func ensureWorkflowRunsOnDedicatedNode(wf *wfv1.Workflow, config SystemConfig) (
wf.Spec.Affinity = &corev1.Affinity{ wf.Spec.Affinity = &corev1.Affinity{
PodAntiAffinity: &corev1.PodAntiAffinity{ PodAntiAffinity: &corev1.PodAntiAffinity{
RequiredDuringSchedulingIgnoredDuringExecution: []corev1.PodAffinityTerm{ RequiredDuringSchedulingIgnoredDuringExecution: []corev1.PodAffinityTerm{
{LabelSelector: &metav1.LabelSelector{ {
LabelSelector: &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{ MatchExpressions: []metav1.LabelSelectorRequirement{
{Key: antiAffinityLabelKey, Operator: "In", Values: []string{nodeSelectorVal}}, {Key: antiAffinityLabelKey, Operator: "In", Values: []string{nodeSelectorVal}},
}, },
}, },
TopologyKey: "kubernetes.io/hostname"}, TopologyKey: "kubernetes.io/hostname",
},
}, },
}, },
} }