...
Create a config map from the configuration file:
Code Block kubectl create configmap 'kafka-config' --from-file='kafka-configuration.xml'
Update the values.yaml file of the hivemq-operator and specify that the Kafka configuration file is taken from the config map:
Code Block hivemq: ... extensions: - name: hivemq-kafka-extension extensionUri: preinstalled enabled: true configMap: kafka-config ...
The content of the kafka-config configMap will be mounted by the HiveMQ Operator to directory /conf-override/extensions/hivemq-kafka-extension/<kafka-configuration.xml>. To copy the configuration file to the desired location, add the following initialization script:
Code Block hivemq: ... extensions: - name: hivemq-kafka-extension extensionUri: preinstalled enabled: true configMap: kafka-config initialization: | [[ -e /conf-override/extensions/hivemq-kafka-extension/kafka-configuration.xml ]] && rm -f $(pwd)/conf/config.xml && cp -s /conf-override/extensions/hivemq-kafka-extension/kafka-configuration.xml $(pwd)/conf/config.xml
Reinstall the HiveMQ Helm chart:
Code Block language bash helm uninstall <releasename>; sleep 20; helm upgrade <releasename> --install hivemq/hivemq-operator \ --values path/to/values.yaml
Verify the content of the Kaka Kafka extension’s config.xml on the HiveMQ pod:
Code Block language bash kubectl exec pod/<my hivemq pod> -- cat /opt/hivemq/extensions/hivemq-kafka-extension/conf/config.xml
...