Skip to content
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

Initial Helm Chart implementation #3036

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Added volumeClaimTemplates to statefulset.yaml
  • Loading branch information
kamiKAZIK committed May 5, 2024
commit f848cee0dbe6ec23a49bc661f3390e7c055278ea
43 changes: 36 additions & 7 deletions deploy/chart/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,6 @@ spec:
secret:
secretName: {{ printf "%s-certs" (include "mosquitto.fullname" .) }}
{{- end }}
- name: data
{{- if .Values.mosquitto.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "mosquitto.fullname" . }}
{{- else }}
emptyDir: {}
{{- end }}
{{- if and .Values.mosquitto.authentication.passwordFile }}
- name: passwordFile
secret:
Expand All @@ -146,3 +139,39 @@ spec:
{{- with .Values.mosquitto.pod.volumes }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}
volumeClaimTemplates:
- metadata:
name: data
labels: {{- include "mosquitto.labels.standard" . | nindent 10 }}
{{- with .Values.mosquitto.common.labels }}
{{- toYaml . | trim | nindent 10 }}
{{- end }}
{{- with .Values.mosquitto.persistentVolumeClaim.labels }}
{{- toYaml . | trim | nindent 10 }}
{{- end }}
{{- if or .Values.mosquitto.common.annotations .Values.mosquitto.persistentVolumeClaim.annotations }}
annotations:
{{- with .Values.mosquitto.common.annotations }}
{{- toYaml . | trim | nindent 10 }}
{{- end }}
{{- with .Values.mosquitto.persistentVolumeClaim.annotations }}
{{- toYaml . | trim | nindent 10 }}
{{- end }}
{{- end }}
spec:
{{- with .Values.mosquitto.persistentVolumeClaim.accessModes }}
accessModes:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
resources:
requests:
storage: {{ required ".Values.mosquitto.persistence.size is required!" .Values.mosquitto.persistence.size }}
{{- with .Values.mosquitto.persistentVolumeClaim.storageClassName }}
{{- if eq "-" . }}
storageClassName: ""
{{- else }}
storageClassName: {{ . }}
{{- end }}
{{- end }}