-
Bug
-
Resolution: Duplicate
-
Major
-
AMQ 7.10.0.OPR.2.GA
-
None
-
False
-
None
-
False
-
Since Operator version 7.10 you can define your own custom labels in the Custom Resource, in order to have the created AMQ pods labeled with them.
It's working properly and after applying your CR for the first time, the AMQ pods will be labeled with your custom labels. But the operator is also using those labels in the statefulset's selector.matchLabels section. This is a problem when you want to update the value of your custom labels, or adding a new one: the Kubernetes spec doesn't allow to modify the spec.selector section.
If you apply again your custom resource after updating the value for one label, the update fails and you'll see the error in the operator's log:
Failed to update *v1.StatefulSet {"ActiveMQArtemis Name": "ex-aao-ss", "error": "StatefulSet.apps \"ex-aao-ss\" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden"}
The custom labels should not be included by default in the Statefulset spec.selector.matchLabels section. Usually the label values can be updated due to customer requirements. IMHO only the label "ActiveMQArtemis" should be used for the selector (and perhaps, the label "application" also).
- is duplicated by
-
ENTMQBR-7111 [Operator, upgrade] 7.10 versions of operator tend to remove stateful set during upgrade
- Closed