diff --git a/roles/backup/README.md b/roles/backup/README.md index e3f35116..f5fe33a4 100644 --- a/roles/backup/README.md +++ b/roles/backup/README.md @@ -36,6 +36,7 @@ Finally, use `kubectl` to create the awx instance in your cluster: #> kubectl apply -f backup-awx.yml ``` +The resulting pvc will contain a backup tar that can be used to restore to a new deployment. Future backups will also be stored in separate tars on the same pvc. Role Variables @@ -47,6 +48,8 @@ A custom, pre-created pvc can be used by setting the following variables. tower_backup_pvc: 'awx-backup-volume-claim' ``` +> If no pvc or storage class is provided, the cluster's default storage class will be used to create the pvc. + This role will automatically create a pvc using a Storage Class if provided: ``` diff --git a/roles/backup/templates/backup_pvc.yml.j2 b/roles/backup/templates/backup_pvc.yml.j2 index ca1411f0..3f918dda 100644 --- a/roles/backup/templates/backup_pvc.yml.j2 +++ b/roles/backup/templates/backup_pvc.yml.j2 @@ -7,7 +7,9 @@ metadata: spec: accessModes: - ReadWriteOnce +{% if tower_postgres_storage_class != '' %} storageClassName: {{ tower_postgres_storage_class }} +{% endif %} resources: requests: storage: {{ tower_backup_size | default('5Gi', true) }}