Skip to content

Incorrect merging of tolerations #1313

Closed
@aikoven

Description

@aikoven

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions