-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Initial Helm Chart implementation #3036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: kamiKAZIK <eduardas.kazakas@gmail.com>
{{ .Values.mosquitto.configFile }} | ||
{{- if .Values.mosquitto.authentication.passwordFile }} | ||
password_file {{ required ".Values.mosquitto.authentication.passwordFilePath is required!" .Values.mosquitto.authentication.passwordFilePath | quote }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is no password file then you should probably add allow_anonymous true
since I don't see a way to enable an auth plugin with this chart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hardillb this is actually possible to set-up by adding necessary values using:
{{ .Values.mosquitto.configFile }}
{{- end -}} | ||
|
||
{{- define "mosquitto.capabilities.ingress.apiVersion" -}} | ||
{{- if semverCompare "<1.14-0" (include "mosquitto.capabilities.kubeVersion" .) -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the last supported version of kube (not EOL) is 1.27, I don't think you need to support 10 year old versions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am more inclined to keep this, as it is already implemented and maybe there are some unlucky guys that are stuck with some very old k8s versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you! I feel it keeps complexity for something very, very old that is EOL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I indeed would keep the release process in a different PR.
I'd suggest adding a Makefile / similar (and run it in this PR) with https://github.com/norwoodj/helm-docs
.PHONY: helm-docs
helm-docs:
go run github.com/norwoodj/helm-docs/cmd/helm-docs@latest
Side note: I'm not a maintainer at all.
@hardillb do you know if we can merge this in? it would be highly appreciated. |
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 |
Maybe if I will have time this/next month, I can remove the SS and create Deployment instead. |
I might need a bit more explanation regarding Deployment vs StatefulSet @npdgm. And preferably some input from project maintainers to decide on what is best for the project. I will have some time in the upcoming 1-1.5 months, so please use this time wisely. |
b7e2d3d
to
e715b04
Compare
@ekazakas any progress on this PR? This would be highly appreciated to have (and have it supported by eclipse-mosquitto) |
{{- with .Values.mosquitto.persistentVolumeClaim.existingVolume }} | ||
volumeName: {{ . }} | ||
{{- end }} | ||
{{- if or .Values.mosquitto.persistentVolumeClaim.matchLabels .Values.mosquitto.persistentVolumeClaim.matchExpressions) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be without the trailing ')':
{{- if or .Values.mosquitto.persistentVolumeClaim.matchLabels .Values.mosquitto.persistentVolumeClaim.matchExpressions }}
|
||
## Identity Set Management image tag. | ||
## | ||
imageTag: 2.0.18-openssl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version is 2.0.20-openssl
## Configure resource requests and limits. | ||
## Ref: https://kubernetes.io/docs/user-guide/compute-resources/ | ||
## | ||
resources: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also configure default limits, for example:
limits:
cpu: 200m
memory: 512Mi
containers: | ||
- name: mosquitto | ||
{{- if .Values.mosquitto.imageDigest }} | ||
image: {{ printf "%s@%s" (required ".Values.mosquitto.image is required!" .Values.mosquitto.image) .Values.mosquitto.imageDigest }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this has to be:
image: {{ printf "%s@%s" (required ".Values.mosquitto.imageDigest is required!" .Values.mosquitto.imageDigest) .Values.mosquitto.imageDigest }}
{{- with .Values.mosquitto.pod.volumes }} | ||
{{- toYaml . | trim | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.mosquitto.persistence.enabled -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is removing one whitespace too many and causing a template error.
Remove the trailing '-':
{{- if .Values.mosquitto.persistence.enabled }}
{{- end }} | ||
type: Opaque | ||
data: | ||
{{- with .Values.mosquitto.mosquitto.passwordFile }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be:
{{- with .Values.mosquitto.authentication.passwordFile }}
- name: certs | ||
mountPath: {{ required ".Values.mosquitto.certificateLocation is required!" .Values.mosquitto.certificateLocation }} | ||
{{- end }} | ||
{{- if and .Values.mosquitto.authentication.passworFile }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo, has to be:
{{- if and .Values.mosquitto.authentication.passwordFile }}
log_dest stdout | ||
{{ .Values.mosquitto.configFile }} | ||
{{- if .Values.mosquitto.authentication.passwordFile }} | ||
password_file {{ required ".Values.mosquitto.authentication.passwordFilePath is required!" .Values.mosquitto.authentication.passwordFilePath | quote }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for password_file the | quote
should be removed, it fills the configmap with: "/localtion/of-file"
which mqqt doesn't get. Has to be without the double quotes.
Should be:
{{- if .Values.mosquitto.authentication.passwordFile }}
password_file {{ required ".Values.mosquitto.authentication.passwordFilePath is required!" .Values.mosquitto.authentication.passwordFilePath }}
@Marck I haven't changed anything since the last time I worked on this PR as the person who wanted some changes never replied, so the chart is still based on StatefulSet. If there is really the need to convert this into a Deployment, I can try to find time for that. I will also go through all your review comments and fix all those issues. Let me know your opinion about StatefulSet vs Deployment. |
@ekazakas No worries, time is precious. |
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:
make test
with your changes locally?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.