Skip to content

Commit

Permalink
feat(templates/dr): modify velero cron
Browse files Browse the repository at this point in the history
  • Loading branch information
Simone Bruzzese committed Jul 11, 2024
1 parent 169b5f0 commit 8120c6f
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/ekscluster-kfd-v1alpha2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ data:
secretAccessKey: example
accessKeyId: example
bucketName: velerobucket
schedules:
install: true
manifestsCron: ""
fullCron: ""
# auth module configuration
auth:
overrides:
Expand Down
4 changes: 4 additions & 0 deletions defaults/kfddistribution-kfd-v1alpha2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ data:
secretAccessKey: example
accessKeyId: example
bucketName: velerobucket
schedules:
install: true
manifestsCron: ""
fullCron: ""
# auth module configuration
auth:
overrides:
Expand Down
4 changes: 4 additions & 0 deletions defaults/onpremises-kfd-v1alpha2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ data:
secretAccessKey: example
accessKeyId: example
bucketName: velerobucket
schedules:
install: true
manifestsCron: ""
fullCron: ""
# auth module configuration
auth:
overrides:
Expand Down
8 changes: 8 additions & 0 deletions templates/distribution/manifests/dr/kustomization.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" }}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 8120c6f

Please sign in to comment.