Default toleration and nodeAffinity of Argo Workflows Job Pods

201 Views Asked by At

I am using Argo Workflows to do some cronjobs. It is seem the generated pods have nodeAffinity and toleration added automatically like this:

  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
          - matchExpressions:
              - key: kubernetes.io/hostname
                operator: In
                values:
                  - node24
  schedulerName: default-scheduler
  tolerations:
    - key: node.kubernetes.io/not-ready
      operator: Exists
      effect: NoExecute
      tolerationSeconds: 300
    - key: node.kubernetes.io/unreachable
      operator: Exists
      effect: NoExecute
      tolerationSeconds: 300

For the nodeAffinity, I would like K8s (instead of Argo) to decide the node to schedule. I have observed that Argo always stick pods to 1~2 specific nodes only;

For the toleration, I am confused why it needs to allow the pod to be scheduled to not-ready/unreachable nodes.

So, is it possible to remove or even customize the default nodeAffinity and toleration?

I found Template Defaults in Argo's docs but it is not detail enough.

Thanks.

0

There are 0 best solutions below