The article refers to https://github.com/hivemq/helm-charts/tree/master/charts/hivemq-platform (HiveMQ Platform) version:
NAME CHART VERSION APP VERSION DESCRIPTION hivemq/hivemq-platform 0.2.18 4.30.0 HiveMQ Platform Helm Chart (new)
The article explains how to deliver a customized logback.xml
to the HiveMQ Platform containers.
\uD83D\uDCD8 Instructions
Prepare the logback.xml and test it locally first.
Create a ConfigMap from the customized logback.xml:
kubectl create configmap logback-configuration --from-file logback.xml --namespace hivemq
Add the element to the additionalVolumes array in the hivemq-platform’s values.yaml:
additionalVolumes: - type: configMap name: logback-configuration mountName: logback-configuration containerName: hivemq path: /opt/hivemq/conf/ subPath: "logback.xml"
Question: Will it re-write all content of the /opt/hivemq/conf directory in the containers?
Answer: No, it will not if you use the subPath:
# If a volume is mounted with subPath, then the contents of the directory are not overwritten. # However, note that changes to a configmap, for example, mounted via subPath will not be propagated to the container. # Therefore, pods have to be restarted.
Execute the helm upgrade command to pick up the changes:
helm upgrade my-broker --install hivemq/hivemq-platform --values hivemq-platform-values.yaml
If everything is correct the rolling restart will happen.