diff --git a/defaults/ekscluster-kfd-v1alpha2.yaml b/defaults/ekscluster-kfd-v1alpha2.yaml index baa4ee82..a269f7c9 100644 --- a/defaults/ekscluster-kfd-v1alpha2.yaml +++ b/defaults/ekscluster-kfd-v1alpha2.yaml @@ -239,6 +239,10 @@ data: secretAccessKey: example accessKeyId: example bucketName: velerobucket + schedules: + install: true + manifestsCron: "" + fullCron: "" # auth module configuration auth: overrides: diff --git a/defaults/kfddistribution-kfd-v1alpha2.yaml b/defaults/kfddistribution-kfd-v1alpha2.yaml index e112ceff..cf621199 100644 --- a/defaults/kfddistribution-kfd-v1alpha2.yaml +++ b/defaults/kfddistribution-kfd-v1alpha2.yaml @@ -226,6 +226,10 @@ data: secretAccessKey: example accessKeyId: example bucketName: velerobucket + schedules: + install: true + manifestsCron: "" + fullCron: "" # auth module configuration auth: overrides: diff --git a/defaults/onpremises-kfd-v1alpha2.yaml b/defaults/onpremises-kfd-v1alpha2.yaml index 0813461d..21463d09 100644 --- a/defaults/onpremises-kfd-v1alpha2.yaml +++ b/defaults/onpremises-kfd-v1alpha2.yaml @@ -226,6 +226,10 @@ data: secretAccessKey: example accessKeyId: example bucketName: velerobucket + schedules: + install: true + manifestsCron: "" + fullCron: "" # auth module configuration auth: overrides: diff --git a/templates/distribution/manifests/dr/kustomization.yaml.tpl b/templates/distribution/manifests/dr/kustomization.yaml.tpl index 5a5d8ef5..5b2d4aad 100644 --- a/templates/distribution/manifests/dr/kustomization.yaml.tpl +++ b/templates/distribution/manifests/dr/kustomization.yaml.tpl @@ -20,7 +20,9 @@ resources: - {{ print "../" .spec.distribution.common.relativeVendorPath "/modules/dr/katalog/velero/velero-node-agent" }} {{- end }} +{{- if .spec.distribution.modules.dr.velero.schedules.install }} - {{ print "../" .spec.distribution.common.relativeVendorPath "/modules/dr/katalog/velero/velero-schedules" }} +{{- end }} {{- if eq .spec.distribution.common.provider.type "eks" }} - resources/eks-velero-backupstoragelocation.yml - resources/eks-velero-volumesnapshotlocation.yml @@ -31,6 +33,12 @@ patchesStrategicMerge: {{- if eq .spec.distribution.common.provider.type "eks" }} - patches/eks-velero.yml {{- end }} +{{- if and (.spec.distribution.modules.dr.velero.schedules.install) (ne .spec.distribution.modules.dr.velero.schedules.manifestsCron "") }} + - patches/velero-schedule-manifests.yml +{{- end }} +{{- if and (.spec.distribution.modules.dr.velero.schedules.install) (ne .spec.distribution.modules.dr.velero.schedules.fullCron "") }} + - patches/velero-schedule-full.yml +{{- end }} {{- if eq .spec.distribution.common.provider.type "none" }} {{- if eq .spec.distribution.modules.dr.velero.backend "externalEndpoint" }} diff --git a/templates/distribution/manifests/dr/patches/velero-schedule-full.yml.tpl b/templates/distribution/manifests/dr/patches/velero-schedule-full.yml.tpl new file mode 100644 index 00000000..82dc38bb --- /dev/null +++ b/templates/distribution/manifests/dr/patches/velero-schedule-full.yml.tpl @@ -0,0 +1,12 @@ +# Copyright (c) 2017-present SIGHUP s.r.l All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +--- +apiVersion: velero.io/v1 +kind: Schedule +metadata: + name: full + namespace: kube-system +spec: + schedule: {{ .spec.distribution.modules.dr.velero.schedules.fullCron }} diff --git a/templates/distribution/manifests/dr/patches/velero-schedule-manifests.yml.tpl b/templates/distribution/manifests/dr/patches/velero-schedule-manifests.yml.tpl new file mode 100644 index 00000000..35ae73b6 --- /dev/null +++ b/templates/distribution/manifests/dr/patches/velero-schedule-manifests.yml.tpl @@ -0,0 +1,12 @@ +# Copyright (c) 2017-present SIGHUP s.r.l All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +--- +apiVersion: velero.io/v1 +kind: Schedule +metadata: + name: manifests + namespace: kube-system +spec: + schedule: {{ .spec.distribution.modules.dr.velero.schedules.manifestsCron }}