PR #14 follow-up: Use storageClassName and document new postgres var a little more.

This commit is contained in:
Jeff Geerling
2019-12-03 14:44:54 -06:00
parent cb37e904dd
commit 4b3f1139c7
5 changed files with 11 additions and 7 deletions

View File

@@ -64,14 +64,16 @@ If you would like to deploy AWX (the open source upstream of Tower) into your cl
tower_task_image: ansible/awx_task:9.0.1
tower_web_image: ansible/awx_web:9.0.1
### Persistent storage for postfix
### Persistent storage for Postgres
If you need to deploy your persistent storage for postfix to a specific storage class, you can override the default variables in the Tower `spec` with the variable `tower_postgres_storage_class` variable:
If you need to use a specific storage class for Postgres' storage, specify `tower_postgres_storage_class` in your Tower spec:
---
spec:
...
tower_postgres_storage_class: managed-nfs-storage
tower_postgres_storage_class: fast-ssd
If it's not specified, Postgres will store it's data on a volume using the default storage class for your cluster.
## Development

View File

@@ -29,3 +29,4 @@ spec:
tower_postgres_pass: awxpass
tower_postgres_image: postgres:9.6
tower_postgres_storage_request: 8Gi
tower_postgres_storage_class: ''

View File

@@ -29,3 +29,4 @@ spec:
tower_postgres_pass: awxpass
tower_postgres_image: postgres:9.6
tower_postgres_storage_request: 8Gi
tower_postgres_storage_class: ''

View File

@@ -31,3 +31,4 @@ tower_rabbitmq_image: rabbitmq:3
tower_postgres_pass: awxpass
tower_postgres_image: postgres:9.6
tower_postgres_storage_request: 8Gi
tower_postgres_storage_class: ''

View File

@@ -53,13 +53,12 @@ spec:
volumeClaimTemplates:
- metadata:
name: postgres
{% if tower_postgres_storage_class is defined %}
annotations:
volume.beta.kubernetes.io/storage-class: '{{ tower_postgres_storage_class }}'
{% endif %}
spec:
accessModes:
- ReadWriteOnce
{% if tower_postgres_storage_class != '' %}
storageClassName: '{{ tower_postgres_storage_class }}'
{% endif %}
resources:
requests:
storage: '{{ tower_postgres_storage_request }}'