diff --git a/internal/util/cmd_setup.go b/internal/util/cmd_setup.go index 9a4e60bc..72e13d57 100644 --- a/internal/util/cmd_setup.go +++ b/internal/util/cmd_setup.go @@ -223,6 +223,24 @@ func createJob(cmd *cobra.Command, conf *config.Global, actionName string) error }, }, }, + { + Weight: 90, + PodAffinityTerm: corev1.PodAffinityTerm{ + TopologyKey: "topology.kubernetes.io/zone", + LabelSelector: &metav1.LabelSelector{ + MatchLabels: conf.Pod.ObjectMeta.Labels, + }, + }, + }, + { + Weight: 80, + PodAffinityTerm: corev1.PodAffinityTerm{ + TopologyKey: "topology.kubernetes.io/region", + LabelSelector: &metav1.LabelSelector{ + MatchLabels: conf.Pod.ObjectMeta.Labels, + }, + }, + }, }, }, },