From 84632262e76a229ab922162a9cd3a9a6d1879469 Mon Sep 17 00:00:00 2001 From: Falk Stern Date: Fri, 29 Nov 2019 11:32:28 +0100 Subject: [PATCH 1/2] Add storage-class definition for postgres pod --- roles/tower/templates/tower_postgres.yaml.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/tower/templates/tower_postgres.yaml.j2 b/roles/tower/templates/tower_postgres.yaml.j2 index a58f21e9..a82ac803 100644 --- a/roles/tower/templates/tower_postgres.yaml.j2 +++ b/roles/tower/templates/tower_postgres.yaml.j2 @@ -53,6 +53,10 @@ 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 From eaa4474e56fbb17ee8887b268a0330e5dc9a7b3d Mon Sep 17 00:00:00 2001 From: Falk Stern Date: Fri, 29 Nov 2019 13:19:05 +0100 Subject: [PATCH 2/2] Added documentation --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 363f6c60..d4721424 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,15 @@ 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 + +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: + + --- + spec: + ... + tower_postgres_storage_class: managed-nfs-storage + ## Development ### Testing