Skip to content

Incorrect merging of tolerations #1313

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
aikoven opened this issue Jun 21, 2023 · 2 comments · Fixed by #1314
Closed

Incorrect merging of tolerations #1313

aikoven opened this issue Jun 21, 2023 · 2 comments · Fixed by #1314
Labels

Comments

@aikoven
Copy link

aikoven commented Jun 21, 2023

What did you do to encounter the bug?

Created a MongoDBCommunity resource like this:

apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
spec:
  statefulSet:
    spec:
      template:
        spec:
          tolerations:
            - effect: NoSchedule
              key: pool
              operator: Equal
              value: my-pool
            - effect: NoExecute
              key: pool
              operator: Equal
              value: my-pool

What did you expect?

StatefulSet has the tolerations as specified.

What happened instead?

StatefulSet has only the second toleration.

Operator Information

  • Operator Version: 0.7.4

Additional context

The reason lies in problematic merging of tolerations, where they are put to a map keyed by Key, effectively not allowing to have multiple tolerations with the same key.

@irajdeep
Copy link
Contributor

Hey @aikoven - that indeed looks like a bug. Would you mind submitting a fix PR.

@siegenthalerroger
Copy link

Quick headsup for people that might end up here after v0.8.1 released, this is potentially broken.

See #1344

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants