Skip to content

Commit

Permalink
fix: reboot annotations (and syntax)
Browse files Browse the repository at this point in the history
  • Loading branch information
wrenix committed Aug 1, 2023
1 parent 3744d68 commit 3cc771b
Showing 1 changed file with 54 additions and 61 deletions.
115 changes: 54 additions & 61 deletions charts/prosody/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,36 @@ spec:
metadata:
labels:
{{- include "prosody.selectorLabels" . | nindent 8 }}
{{- range $label, $value := mergeOverwrite .Values.global.podLabels .Values.podLabels }}
{{ $label }}: {{ $value }}
{{- end }}
si.jit.meet/secret-timestamp: {{ now | date "20060102T150405" }}
{{- with mergeOverwrite .Values.global.podAnnotations .Values.podAnnotations }}
{{- toYaml (mergeOverwrite .Values.global.podLabels .Values.podLabels) | nindent 8 }}
annotations:
{{- range $annotation, $value := . }}
{{ $annotation }}: {{ $value }}
{{- end }}
{{- end }}
hash-secret: "{{ toYaml .Values.secretEnvs | sha256sum | trunc 32 }}"
hash-configmap: "{{ toYaml .Values.env | sha256sum | trunc 32 }}"
{{- toYaml (mergeOverwrite .Values.global.podAnnotations .Values.podAnnotations) | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "prosody.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ tpl (default .Chart.AppVersion .Values.image.tag ) . }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "prosody.fullname" . }}
- secretRef:
name: {{ include "prosody.fullname" . }}
{{- range .Values.extraEnvFrom }}
- {{ tpl (toYaml . ) $ | indent 12 | trim }}
{{- end }}
{{- if .Values.extraEnvs }}
- configMapRef:
name: {{ include "prosody.fullname" . }}
- secretRef:
name: {{ include "prosody.fullname" . }}
{{- with .Values.extraEnvFrom }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.extraEnvs }}
env:
{{- range .Values.extraEnvs }}
- {{ tpl (toYaml . ) $ | indent 12 | trim }}
{{- end }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: xmpp-c2s
Expand All @@ -74,58 +67,58 @@ spec:
protocol: TCP
{{- with .Values.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: prosody-data
mountPath: {{ .Values.dataDir }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
- name: prosody-data
mountPath: {{ .Values.dataDir }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- name: prosody-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: prosody-data
{{- else }}
emptyDir: {}
- name: prosody-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: prosody-data
{{- else }}
emptyDir: {}
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.nodeSelector }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if or .Values.persistence.enabled .Values.extraVolumeClaimTemplates }}
volumeClaimTemplates:
- metadata:
name: prosody-data
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- with .Values.persistence.storageClassName }}
storageClassName: {{ . | quote }}
{{- end }}
{{- with .Values.extraVolumeClaimTemplates }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- if or .Values.persistence.enabled .Values.extraVolumeClaimTemplates }}
volumeClaimTemplates:
- metadata:
name: prosody-data
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- with .Values.persistence.storageClassName }}
storageClassName: {{ . | quote }}
{{- end }}
{{- with .Values.extraVolumeClaimTemplates }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

0 comments on commit 3cc771b

Please sign in to comment.