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
Update statefulset.yaml
  • Loading branch information
kamiKAZIK committed May 5, 2024
commit 6c02752e2f5112b015af128cef442ebe54503494
26 changes: 21 additions & 5 deletions deploy/chart/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ spec:
volumeMounts:
- name: config
mountPath: {{ required ".Values.mosquitto.configurationLocation is required!" .Values.mosquitto.configurationLocation }}
- name: {{ include "mosquitto.fullname" . }}
mountPath: {{ required ".Values.mosquitto.persistence.location is required!" .Values.mosquitto.persistence.location }}
{{- if .Values.mosquitto.ports.mqtts.enabled }}
- name: certs
mountPath: {{ required ".Values.mosquitto.certificateLocation is required!" .Values.mosquitto.certificateLocation }}
{{- end }}
{{- if .Values.mosquitto.persistence.enabled -}}
- name: data
mountPath: {{ required ".Values.mosquitto.persistence.location is required!" .Values.mosquitto.persistence.location }}
{{- end }}
{{- if and .Values.mosquitto.authentication.passworFile }}
- name: passwordFile
mountPath: {{ required ".Values.mosquitto.authentication.passwordFilePath is required!" .Values.mosquitto.authentication.passwordFilePath }}
Expand All @@ -123,6 +121,10 @@ spec:
- name: config
configMap:
name: {{ include "mosquitto.fullname" . }}
{{- if not .Values.mosquitto.persistence.enabled }}
- name: {{ include "mosquitto.fullname" . }}
emptyDir: {}
{{- end }}
{{- if .Values.mosquitto.ports.mqtts.enabled }}
- name: certs
secret:
Expand All @@ -144,7 +146,7 @@ spec:
{{- if .Values.mosquitto.persistence.enabled -}}
volumeClaimTemplates:
- metadata:
name: data
name: {{ include "mosquitto.fullname" . }}
labels: {{- include "mosquitto.labels.standard" . | nindent 10 }}
{{- with .Values.mosquitto.common.labels }}
{{- toYaml . | trim | nindent 10 }}
Expand All @@ -168,6 +170,20 @@ spec:
- {{ . }}
{{- end }}
{{- end }}
{{- with .Values.mosquitto.persistentVolumeClaim.existingVolume }}
volumeName: {{ . }}
{{- end }}
{{- if or .Values.mosquitto.persistentVolumeClaim.matchLabels .Values.mosquitto.persistentVolumeClaim.matchExpressions) }}
selector:
{{- with .Values.mosquitto.persistentVolumeClaim.matchLabels }}
matchLabels:
{{- toYaml . | trim | nindent 12 }}
{{- end -}}
{{- with .Values.mosquitto.persistentVolumeClaim.matchExpressions }}
matchExpressions:
{{- toYaml . | trim | nindent 12 }}
{{- end -}}
{{- end }}
resources:
requests:
storage: {{ required ".Values.mosquitto.persistence.size is required!" .Values.mosquitto.persistence.size }}
Expand Down