diff --git a/charts/sapl/v0.2.0/templates/deployment.yaml b/charts/sapl/v0.2.0/templates/deployment.yaml index 56cc123..018367b 100644 --- a/charts/sapl/v0.2.0/templates/deployment.yaml +++ b/charts/sapl/v0.2.0/templates/deployment.yaml @@ -27,6 +27,19 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: + {{- if .Values.velero.backup.enabled }} + - name: {{ .Chart.Name}}-fsfreeze + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + securityContext: + privileged: true + volumeMounts: + - mountPath: /var/interlegis/sapl/media + name: media + command: + - "/bin/bash" + - "-c" + - "sleep infinity" + {{- end }} - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} diff --git a/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml b/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml index 3bc3187..bee4df8 100644 --- a/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml +++ b/charts/sapl/v0.2.0/templates/velero-schedule-monthly.yaml @@ -28,6 +28,7 @@ spec: {{- include "sapl.selectorLabels" . | nindent 12 }} pre: - exec: + container: {{ .Chart.Name }}-fsfreeze command: - /sbin/fsfreeze - --freeze @@ -35,6 +36,7 @@ spec: timeout: 10s post: - exec: + container: {{ .Chart.Name }}-fsfreeze command: - /sbin/fsfreeze - --unfreeze diff --git a/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml b/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml index fc65a10..a3a9f5b 100644 --- a/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml +++ b/charts/sapl/v0.2.0/templates/velero-schedule-weekdays.yaml @@ -28,6 +28,7 @@ spec: {{- include "sapl.selectorLabels" . | nindent 12 }} pre: - exec: + container: {{ .Chart.Name }}-fsfreeze command: - /sbin/fsfreeze - --freeze @@ -35,6 +36,7 @@ spec: timeout: 10s post: - exec: + container: {{ .Chart.Name }}-fsfreeze command: - /sbin/fsfreeze - --unfreeze diff --git a/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml b/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml index fda990a..074d102 100644 --- a/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml +++ b/charts/sapl/v0.2.0/templates/velero-schedule-weekly.yaml @@ -28,6 +28,7 @@ spec: {{- include "sapl.selectorLabels" . | nindent 12 }} pre: - exec: + container: {{ .Chart.Name }}-fsfreeze command: - /sbin/fsfreeze - --freeze @@ -35,6 +36,7 @@ spec: timeout: 10s post: - exec: + container: {{ .Chart.Name }}-fsfreeze command: - /sbin/fsfreeze - --unfreeze