Use default cluster storage class if none is provided

This commit is contained in:
Christian M. Adams
2021-03-23 17:15:15 -04:00
parent bcd1410438
commit 54efda1a25
2 changed files with 5 additions and 0 deletions

View File

@@ -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:
```

View File

@@ -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) }}