|
|
|
@ -11,8 +11,6 @@ spec: |
|
|
|
selector: |
|
|
|
matchLabels: |
|
|
|
{{- include "snappymail.selectorLabels" . | nindent 6 }} |
|
|
|
strategy: |
|
|
|
type: Recreate |
|
|
|
template: |
|
|
|
metadata: |
|
|
|
{{- with .Values.podAnnotations }} |
|
|
|
@ -31,7 +29,13 @@ spec: |
|
|
|
initContainers: |
|
|
|
- name: fix-volume-permissions |
|
|
|
image: alpine:latest |
|
|
|
command: ["sh", "-c", "chown -R 82:82 /var/lib/snappymail"] |
|
|
|
command: |
|
|
|
- sh |
|
|
|
- -c |
|
|
|
- | |
|
|
|
echo "[INFO] Setting permissions on /var/lib/snappymail" |
|
|
|
chown -R 82:82 /var/lib/snappymail |
|
|
|
find /var/lib/snappymail/ -type d -exec chmod 750 {} \; |
|
|
|
securityContext: |
|
|
|
runAsUser: 0 # Força a execução como root temporariamente |
|
|
|
volumeMounts: |
|
|
|
|