InformaticsMatters / squonk

Squonk platform and computational notebook
Apache License 2.0
8 stars 3 forks source link

Provide ability to add affinity to pipeline pods #135

Open alanbchristie opened 3 years ago

alanbchristie commented 3 years ago

Currently the OpenShiftRunner does not provide a node selector or affinity definition. The PodBuilder should include an affinity object to allow selection of worker nodes in preference to application nodes but avoiding core nodes. An example would be something like: -

    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: informaticsmatters.com/purpose
                operator: NotIn
                values:
                - core
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            preference:
              matchExpressions:
              - key: informaticsmatters.com/purpose
                operator: In
                values:
                - worker