Overriding the logback.xml file in HiveMQ Operator

This article explains step-by-step how to override the "logback.xml" file in the HiveMQ Operator using ConfigMaps.

A ConfigMap is a Kubernetes API object that lets you store and share non-sensitive, unencrypted configuration information. ConfigMaps allow you to decouple your configurations from your Pods and components, which helps keep your workloads portable

 Instructions

  1. Put the logback.xml file into a configMap and then mount it to the path /opt/hivemq/conf in the HiveMQ pod.

    kubectl create configmap hivemq-logback --from-file=/path/to/logback.xml -n <broker namespace>
  2. Configure the mapping in your custom values.yaml file.

    hivemq: configMaps: - name: hivemq-logback path: /opt/hivemq/conf

     

The readiness probe is checking the /opt/hivemq/log/hivemq.log file. If you change the name of the "hivemq.log" file to something else, the readiness probe will fail.