summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoît Chauvet <benoit.chauvet@gmail.com>2020-07-29 14:11:12 +0200
committerBenoît Chauvet <benoit.chauvet@gmail.com>2020-07-29 14:11:12 +0200
commite917cffb5f3b58acf7dc35411310afb53a658f01 (patch)
treec538eabf8b09242735345bc765a07ee7802ce6f7
parentMerge pull request #7707 from nixocio/ui_update_per_mockup (diff)
downloadawx-e917cffb5f3b58acf7dc35411310afb53a658f01.tar.xz
awx-e917cffb5f3b58acf7dc35411310afb53a658f01.zip
Allow to use an existing PersistanceVolumeClaim for postgresql install with Helm
Signed-off-by: Benoît Chauvet <benoit.chauvet@gmail.com>
-rw-r--r--INSTALL.md2
-rw-r--r--installer/inventory1
-rw-r--r--installer/roles/kubernetes/templates/postgresql-values.yml.j23
3 files changed, 6 insertions, 0 deletions
diff --git a/INSTALL.md b/INSTALL.md
index fd0f998fba..51a4d12acf 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -384,6 +384,8 @@ Before starting the install process, review the [inventory](./installer/inventor
If you want the AWX installer to manage creating the database pod (rather than installing and configuring postgres on your own). Then you will need to have a working `helm` installation, you can find details here: [https://helm.sh/docs/intro/quickstart/](https://helm.sh/docs/intro/quickstart/).
+You do not need to create a [Persistent Volume Claim](https://docs.openshift.org/latest/dev_guide/persistent_volumes.html) as Helm does it for you. However, an existing one may be used by setting the `pg_persistence_existingclaim` variable.
+
Newer Kubernetes clusters with RBAC enabled will need to make sure a service account is created, make sure to follow the instructions here [https://helm.sh/docs/topics/rbac/](https://helm.sh/docs/topics/rbac/)
### Run the installer
diff --git a/installer/inventory b/installer/inventory
index 8ea054a5fb..3ffbe1e79d 100644
--- a/installer/inventory
+++ b/installer/inventory
@@ -25,6 +25,7 @@ dockerhub_base=ansible
# pg_serviceaccount=awx
# pg_volume_capacity=5
# pg_persistence_storageClass=StorageClassName
+# pg_persistence_existingclaim=postgres_pvc
# pg_cpu_limit=1000
# pg_mem_limit=2
diff --git a/installer/roles/kubernetes/templates/postgresql-values.yml.j2 b/installer/roles/kubernetes/templates/postgresql-values.yml.j2
index 83a0a1d578..658b898505 100644
--- a/installer/roles/kubernetes/templates/postgresql-values.yml.j2
+++ b/installer/roles/kubernetes/templates/postgresql-values.yml.j2
@@ -6,6 +6,9 @@ persistence:
{% if pg_persistence_storageClass is defined %}
storageClass: {{ pg_persistence_storageClass }}
{% endif %}
+{% if pg_persistence_existingclaim is defined %}
+ existingClaim: {{ pg_persistence_existingclaim }}
+{% endif %}
{% if pg_cpu_limit is defined or pg_mem_limit is defined %}
resources:
limits: