Files
helm-charts/charts/volsync-target/templates/replication-source.yaml
Alex Lebens 6e97b34c88
All checks were successful
lint-and-test / lint-helm (push) Successful in 8s
lint-and-test / chart-testing (push) Successful in 22s
release-charts-volsync-target / release (push) Successful in 23s
renovate / renovate (push) Successful in 1m5s
fix proper indent
2025-12-15 19:03:45 -06:00

108 lines
3.6 KiB
YAML

{{- if .Values.local.enabled }}
---
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: {{ include "volsync.name" . }}-source-local
namespace: {{ include "volsync.namespace" . }}
labels:
{{- include "volsync.labels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "volsync.name" . }}
{{- with .Values.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
sourcePVC: {{ .Values.pvcTarget }}
trigger:
schedule: {{ .Values.local.schedule }}
restic:
pruneIntervalDays: {{ .Values.local.restic.pruneIntervalDays }}
repository: {{ include "volsync.localRepoName" . }}
retain:
{{- with .Values.local.restic.retain }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.moverSecurityContext }}
moverSecurityContext:
{{- with .Values.moverSecurityContext }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
copyMethod: {{ .Values.local.restic.copyMethod }}
storageClassName: {{ .Values.local.restic.storageClassName }}
volumeSnapshotClassName: {{ .Values.local.restic.volumeSnapshotClassName }}
cacheCapacity: {{ .Values.local.restic.cacheCapacity }}
{{- end }}
{{- if .Values.remote.enabled }}
---
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: {{ include "volsync.name" . }}-source-remote
namespace: {{ include "volsync.namespace" . }}
labels:
{{- include "volsync.labels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "volsync.name" . }}
{{- with .Values.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
sourcePVC: {{ .Values.pvcTarget | required "PVC target is required" }}
trigger:
schedule: {{ .Values.remote.schedule }}
restic:
pruneIntervalDays: {{ .Values.remote.restic.pruneIntervalDays }}
repository: {{ include "volsync.remoteRepoName" . }}
retain:
{{- with .Values.remote.restic.retain }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.moverSecurityContext }}
moverSecurityContext:
{{- with .Values.moverSecurityContext }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
copyMethod: {{ .Values.remote.restic.copyMethod }}
storageClassName: {{ .Values.remote.restic.storageClassName }}
volumeSnapshotClassName: {{ .Values.remote.restic.volumeSnapshotClassName }}
cacheCapacity: {{ .Values.remote.restic.cacheCapacity }}
{{- end }}
{{- if .Values.external.enabled }}
---
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: {{ include "volsync.name" . }}-source-external
namespace: {{ include "volsync.namespace" . }}
labels:
{{- include "volsync.labels" . | nindent 4 }}
app.kubernetes.io/name: {{ include "volsync.name" . }}
{{- with .Values.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
sourcePVC: {{ .Values.pvcTarget }}
trigger:
schedule: {{ .Values.external.schedule }}
restic:
pruneIntervalDays: {{ .Values.external.restic.pruneIntervalDays }}
repository: {{ include "volsync.externalRepoName" . }}
retain:
{{- with .Values.external.restic.retain }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.moverSecurityContext }}
moverSecurityContext:
{{- with .Values.moverSecurityContext }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
copyMethod: {{ .Values.external.restic.copyMethod }}
storageClassName: {{ .Values.external.restic.storageClassName }}
volumeSnapshotClassName: {{ .Values.external.restic.volumeSnapshotClassName }}
cacheCapacity: {{ .Values.external.restic.cacheCapacity }}
{{- end }}