Browse Source

First attempt to backup using velero

master
Fábio Kaiser Rauber 4 years ago
parent
commit
c535109a30
  1. 7
      charts/portalmodelo/v0.5.0/questions.yaml
  2. 21
      charts/portalmodelo/v0.5.0/templates/velero-schedule-weekdays.yaml
  3. 4
      charts/portalmodelo/v0.5.0/values.yaml

7
charts/portalmodelo/v0.5.0/questions.yaml

@ -109,6 +109,13 @@ questions:
label: "Tamanho do volume" label: "Tamanho do volume"
description: "Espaço em disco disponível para o portal." description: "Espaço em disco disponível para o portal."
group: Armazenamento group: Armazenamento
- variable: velero.backup.enabled
default: true
type: boolean
label: "Habilitar backup com Velero?"
description: "Criar ou não os objetos para backup com o Velero."
required: false
group: Armazenamento
# Configurações Avançadas # Configurações Avançadas
- variable: portal.timeZone - variable: portal.timeZone

21
charts/portalmodelo/v0.5.0/templates/velero-schedule-weekdays.yaml

@ -0,0 +1,21 @@
{{- if .Values.velero.backup.enabled }}
apiVersion: velero.io/v1
kind: Schedule
metadata:
name: {{ include "portalmodelo.fullname" . }}-weekdays
spec:
# generate a random backup time between 1 and 5 AM on weekdays
schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} * * 1-5
template:
includedNamespaces:
- {{ .Release.Namespace }}
# cert-manager objects are usually blocked during backup
excludedResources:
- certificates.cert-manager.io
- orders.acme.cert-manager.io
- certificaterequests.cert-manager.io
snapshotVolumes: true
# every weekday backup is good for the next week (7 days)
ttl: 168h0m0s
useOwnerReferencesInBackup: false
{{- end }}

4
charts/portalmodelo/v0.5.0/values.yaml

@ -20,6 +20,10 @@ persistence:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
size: 2Gi size: 2Gi
velero:
backup:
enabled: false
portal: portal:
adminPassword: altereme adminPassword: altereme
rootPassword: altereme rootPassword: altereme

Loading…
Cancel
Save