diff --git a/restic/Chart.yaml b/restic/Chart.yaml index 7fef4563b6425615a94f9088814cd689a93357ed..7e4b93b40696cd39e85063731ec51dd6fae4c09f 100644 --- a/restic/Chart.yaml +++ b/restic/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: restic description: Helm Chart for restic type: application -version: 1.0.1 +version: 1.0.2 appVersion: "0.13.1" diff --git a/restic/templates/cronjob_backup.yaml b/restic/templates/cronjob.yaml similarity index 73% rename from restic/templates/cronjob_backup.yaml rename to restic/templates/cronjob.yaml index f2b75a84c5acc8664f53d16ab8a6951a753c6003..950d0de35b277de846cdf5e73e8c81f4becc2867 100644 --- a/restic/templates/cronjob_backup.yaml +++ b/restic/templates/cronjob.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: CronJob metadata: - name: {{ include "restic-helm.fullname" . }}-backup + name: {{ include "restic-helm.fullname" . }} labels: {{- include "restic-helm.labels" . | nindent 4 }} spec: @@ -35,7 +35,7 @@ spec: - name: data {{- .Values.volume | nindent 14 }} containers: - - name: {{ .Chart.Name }} + - name: backup securityContext: {{- toYaml .Values.securityContext | nindent 16 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" @@ -54,6 +54,22 @@ spec: volumeMounts: - mountPath: "/sync" name: data + - name: forget + securityContext: + {{- toYaml .Values.securityContext | nindent 16 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - "-r" + - "{{ .Values.repository.name }}" + - "forget" + - "--prune" + {{- toYaml .Values.keepOptions | nindent 16 }} + envFrom: + - secretRef: + name: {{ include "restic-helm.fullname" . }} + resources: + {{- toYaml .Values.resources | nindent 16 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 12 }} diff --git a/restic/templates/cronjob_forget.yaml b/restic/templates/cronjob_forget.yaml deleted file mode 100644 index 953113bf0a00c0a749c51f4c2963212e63d7f0f5..0000000000000000000000000000000000000000 --- a/restic/templates/cronjob_forget.yaml +++ /dev/null @@ -1,63 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - name: {{ include "restic-helm.fullname" . }}-forget - labels: - {{- include "restic-helm.labels" . | nindent 4 }} -spec: - schedule: "{{ .Values.schedule }}" - jobTemplate: - metadata: - {{- with .Values.jobAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "restic-helm.labels" . | nindent 8 }} - spec: - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 12 }} - {{- end }} - labels: - {{- include "restic-helm.labels" . | nindent 12 }} - spec: - restartPolicy: OnFailure - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 12 }} - {{- end }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 12 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 16 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - workingDir: "/sync" - args: - - "-r" - - "{{ .Values.repository.name }}" - - "forget" - - "--prune" - {{- toYaml .Values.keepOptions | nindent 16 }} - envFrom: - - secretRef: - name: {{ include "restic-helm.fullname" . }} - resources: - {{- toYaml .Values.resources | nindent 16 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 12 }} - {{- end }}