Skip to content

Review-apps - Do not set (anti-)affinities for pods

What does this MR do and why?

Disable (anti-)affinities for pods

We have several problems in our cluster due to affinities that are blocking scheduling to nodes.

This commit is an experiment to remove those affinities.

Does it work?

Before (in another k8s namespace)

$ k get deploy,sts -o yaml | grep -A10 affinity
        affinity:
          podAntiAffinity:
            preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
  [...]

After (in the k8s namespace for this MR)

$ kubens review-ddieulivol-0ojp3o
$ k get deploy,sts -o yaml | grep -A10 affinity
# There should be no entries

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by David Dieulivol

Merge request reports