Skip to content

Conversation

FxKu
Copy link
Member

@FxKu FxKu commented Dec 23, 2021

When adding tolerations to the manifest it will simply be ignored since the comparison between running and desired stateful set does not yield a mismatch. This PR will introduce a rolling update trigger for toleration changes just like with nodeAffinity. Only slice length is compared for now.

With nodeAffinity we spotted another problem: If somebody specified nodeAffinity in the manifest and has configured node_readiness_label the resulting affinity on the pods will have two matchExpressions section in the nodeSelectorTerms.

  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: manifestlabelkey
            ...
        - matchExpressions:
          - key: myreadinesslabelkey
            ...

Multiple matchExpressions are evaluated with OR condition. Thus, pods could be scheduled on nodes having either one of the specified expressions. This might be fine for some users. However, we want the readiness label to be evaluated always together with other specified affinities. Therefore, we will introduce another option to choose if the config affinity should get merged under one matchExpressions (AND) or stay in it's own (OR).

Finally, this PR also tries to re-enable the taint based eviction and node readiness label tests which use the features touched here.

@FxKu FxKu added this to the 1.8 milestone Dec 23, 2021
@FxKu FxKu added the zalando label Dec 23, 2021
FxKu added 2 commits January 6, 2022 09:00
make taint e2e test more robust

change merge behavior of nodeSelectorTerms for node readiness label
@FxKu FxKu force-pushed the toleration-sync branch from 784c016 to 541a484 Compare January 6, 2022 08:06
@FxKu FxKu changed the title include toleration in statefulset comparison toleration diff and nodeReadinessLabel merge with manifest matchExpressions Jan 6, 2022
Copy link
Member

@sdudoladov sdudoladov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add 2 examples (for OR and AND`) to the admin docs showcasing the different behavior ?

@FxKu
Copy link
Member Author

FxKu commented Jan 27, 2022

👍

1 similar comment
@sdudoladov
Copy link
Member

👍

@FxKu FxKu merged commit a78a619 into master Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants