diff --git a/README.md b/README.md index 6cf9a2d9..462d3d3d 100644 --- a/README.md +++ b/README.md @@ -422,6 +422,9 @@ spec: limits: storage: 50Gi postgres_storage_class: fast-ssd + postgres_extra_args: + - '-c' + - 'max_connections=1000' ``` **Note**: If `postgres_storage_class` is not defined, Postgres will store it's data on a volume using the default storage class for your cluster. diff --git a/config/crd/bases/awx.ansible.com_awxs.yaml b/config/crd/bases/awx.ansible.com_awxs.yaml index 3f7f5d00..988b01d0 100644 --- a/config/crd/bases/awx.ansible.com_awxs.yaml +++ b/config/crd/bases/awx.ansible.com_awxs.yaml @@ -362,6 +362,10 @@ spec: postgres_data_path: description: Path where the PostgreSQL data are located type: string + postgres_extra_args: + type: array + items: + type: string ca_trust_bundle: description: Path where the trusted CA bundle is available type: string diff --git a/roles/installer/defaults/main.yml b/roles/installer/defaults/main.yml index df7f13e3..dadb7877 100644 --- a/roles/installer/defaults/main.yml +++ b/roles/installer/defaults/main.yml @@ -215,6 +215,9 @@ projects_persistence: false # Define an existing PersistentVolumeClaim to use projects_existing_claim: '' # +# Define postgres configuration arguments to use +postgres_extra_args: '' + # Define the storage_class, size and access_mode # when not using an existing claim projects_storage_size: 8Gi diff --git a/roles/installer/templates/postgres.yaml.j2 b/roles/installer/templates/postgres.yaml.j2 index 185c0373..817485c7 100644 --- a/roles/installer/templates/postgres.yaml.j2 +++ b/roles/installer/templates/postgres.yaml.j2 @@ -41,6 +41,9 @@ spec: - image: '{{ _postgres_image }}' imagePullPolicy: '{{ image_pull_policy }}' name: postgres +{% if postgres_extra_args %} + args: {{ postgres_extra_args }} +{% endif %} env: # For postgres_image based on rhel8/postgresql-12 - name: POSTGRESQL_DATABASE