Hi everybody.
I asked the following question on the artemiscloud GitHub repo in issue
936<https://github.com/artemiscloud/activemq-artemis-operator/issues/936>:
When updating the `routingType` of an address and applying the changes using
kubectl, the operator doesn't update the broker and instead logs errors,
stating that the new type is not allowed.
Updating addresses using kubectl apply should be supported as of #20?
for example, when updating my address from
```
apiVersion: broker.amq.io/v1beta1
kind: ActiveMQArtemisAddress
metadata:
name: xxxx
spec:
addressName: xxxx
queueName: xxxx
routingType: multicast
queueConfiguration:
durable: true
```
to
```
apiVersion: broker.amq.io/v1beta1
kind: ActiveMQArtemisAddress
metadata:
name: xxxx
spec:
addressName: xxxx
queueName: xxxx
routingType: anycast
queueConfiguration:
durable: true
```
the operator doesn't update the broker and instead logs errors:
```
{"level":"error","ts":"2024-05-29T11:36:28.597Z","logger":"setup","msg":"Reconciler
error","controller":"activemqartemisaddress","controllerGroup":"broker.amq.io","controllerKind":"ActiveMQArtemisAddress","ActiveMQArtemisAddress":{"name":"xxxx","namespace":"xxx"},"namespace":"xxxx","name":"xxxx","reconcileID":"3b5ebd3e-b972-4cdf-b1e0-43200d86d380","error":"Error
response code 500, type java.lang.IllegalStateException, message
java.lang.IllegalStateException : AMQ229211: Can't update queue xxxx with
routing type: ANYCAST, Supported routing types for address: xxxx are
[MULTICAST] and data
","stacktrace":"github.com/go-logr/logr.Logger.Error\n\t/opt/app-root/src/go/pkg/mod/github.com/go-logr/[email protected]/logr.go:299\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227"}
```
If this is indeed intended behaviour, how would you go about updating an
address type?
As this is intended behavior, how would one go about correctly updating an
address? Does one have to (manually) delete the address before re-creating it
with the new configuration?
Sorry if this question is obvious, but I am genuinely curious.
Thanks,
Alex