eclipse / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
8.61k stars 2.33k forks source link

Initial Helm Chart implementation #3036

Open kamiKAZIK opened 2 months ago

kamiKAZIK commented 2 months ago

Thank you for contributing your time to the Mosquitto project!

Before you go any further, please note that we cannot accept contributions if you haven't signed the Eclipse Contributor Agreement. If you aren't able to do that, or just don't want to, please describe your bug fix/feature change in an issue. For simple bug fixes it is can be just as easy for us to be told about the problem and then go fix it directly.

Then please check the following list of things we ask for in your pull request:


Greetings, I would like to contribute this Helm Chart for Mosquitto project. I would love if anyone could review it and write down necessary fixed, if there have to be any. It would be nice and useful if the project has it's own officially supported Helm Chart to speed up deployments on Kubernetes.

jlpedrosa commented 1 month ago

@hardillb do you know if we can merge this in? it would be highly appreciated.

npdgm commented 1 week ago

Hi. I understand you went for a Statefullset instead of a Deployment because of persistence, however this comes with severe drawbacks for apps that run a single replica such as Mosquitto. I would suggest to give the user the choice to run a Deployment with strategy.type: Recreate. The problem with StatefullSet is the k8s scheduler wont restart Mosquitto on a node crash until it comes back online or is deleted. That's bad for high availability. With a Deployment, the Pod is recreated quickly. Having the right strategy type will prevent rollout issues of concurrent requests to a RWO PersistentVolume, and it is the responsibility of the CSI to prevent edge cases with crashing nodes and ensure no multiple attachments occur.

kamiKAZIK commented 1 week ago

Hi. I understand you went for a Statefullset instead of a Deployment because of persistence, however this comes with severe drawbacks for apps that run a single replica such as Mosquitto. I would suggest to give the user the choice to run a Deployment with strategy.type: Recreate. The problem with StatefullSet is the k8s scheduler wont restart Mosquitto on a node crash until it comes back online or is deleted. That's bad for high availability. With a Deployment, the Pod is recreated quickly. Having the right strategy type will prevent rollout issues of concurrent requests to a RWO PersistentVolume, and it is the responsibility of the CSI to prevent edge cases with crashing nodes and ensure no multiple attachments occur.

Maybe if I will have time this/next month, I can remove the SS and create Deployment instead.