Skip to content
Snippets Groups Projects
Verified Commit c76f89b9 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

fix: define idempotent init hook

parent 933f0b6b
No related branches found
No related tags found
No related merge requests found
Pipeline #2861 passed
...@@ -41,8 +41,6 @@ spec: ...@@ -41,8 +41,6 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
args: args:
- "-r"
- "{{ .Values.repository.name }}"
- "forget" - "forget"
- "--prune" - "--prune"
{{- toYaml .Values.keepOptions | nindent 16 }} {{- toYaml .Values.keepOptions | nindent 16 }}
...@@ -59,8 +57,6 @@ spec: ...@@ -59,8 +57,6 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
workingDir: "/sync" workingDir: "/sync"
args: args:
- "-r"
- "{{ .Values.repository.name }}"
- "backup" - "backup"
- "." - "."
envFrom: envFrom:
......
...@@ -31,11 +31,11 @@ spec: ...@@ -31,11 +31,11 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
workingDir: "/sync" command:
- "/bin/sh"
- "-c"
args: args:
- "-r" - "restic cat config || restic init"
- "{{ .Values.repository.name }}"
- "init"
envFrom: envFrom:
- secretRef: - secretRef:
name: {{ include "restic-helm.fullname" . }} name: {{ include "restic-helm.fullname" . }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment