Skip to content

Changes to the podSpec -> nodeAffinity of an Instance don't trigger an update of the StatefulSet #396

Description

@M-Schiefer

Describe the bug
Changes to the podSpec -> nodeAffinity of an Instance don't trigger an update of the StatefulSet, which means changes there are only applied after manually deleting the StatefulSet to trigger a recreation by the Operator.

We roll out the changes to the Instance object via helm, and deleting the StatefulSet manually is the only way to then have them be applied.

To Reproduce
Steps to reproduce the behavior:

  1. Edit an Instance and modify something in the nodeAffinities:
spec:
  podSpec:
    affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
            - matchExpressions:
                - key: workload
                  operator: In
                  values:
                    - app-instance
  1. Observe that the StatefulSet remains unchanged, despite the Operator noticing the change and writing logs about the Instance
  2. Delete the STS manually
  3. Observe that the Operator recreates the STS with the changes

Expected behavior
Changes to an Instance that affect the StatefulSet should be applied automatically by the operator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions