ibm-messaging / mq-helm

Apache License 2.0
25 stars 33 forks source link

Dynamic configurations to update mqsc without restarting the POD #82

Closed uaw013 closed 1 month ago

uaw013 commented 1 month ago

Hi,

We are able to create queues, channels topics etc, but everytime we need to restart the pod before the change is activated. below the base-helm-values what we used, this works. queueManager: mqscConfigMaps:

We would like to add or remove queues with zero downtime. What is the best practices to do that?

Platform Kubernetes. Client Version: v1.26.9 Kustomize Version: v4.5.7 Server Version: v1.27.11

gevezex commented 1 month ago

I am also very interested for the solution 👍🏻

arthurbarr commented 1 month ago

MQ has the option of using declarative configuration, but all the other options are still available. MQ's declarative "auto config" feature (used by the container) was written to apply MQSC and INI files at queue manager start up time. This was mainly so that if it goes wrong, then MQ can roll back to the previous working configuration.

If you are confident that your configuration changes will work against a running queue manager, with connected and active applications, then you can still use any of the other configuration options MQ offers, including running MQSC scripts with runmqsc, using the REST admin API, using the MQ message-based (PCF) administration, using the MQ web console, the old MQ Explorer UI, or any number of tools which build on top of these.

For example, one approach might be that when you change an MQSC file in source control, your CI/CD pipeline also does a kubectl exec to run runmqsc to apply it immediately. This way, you still have a "declarative" configuration, but it is applied immediately. You need to do your own pre-validation of that change though, because if you're applying it to a live production queue manager, you need to be confident that the change is correct.