From 1d14ebccade39e61fb679d6ee7b02407663d27db Mon Sep 17 00:00:00 2001 From: Yanis Guenane Date: Fri, 30 Apr 2021 11:06:40 +0200 Subject: [PATCH] Extra Settings: Allow one to pass extra API configuration settings. For more advanced usage, a user can do the extra_volumes/extra_volume_mounts dance. But for simple need adding this parameter make it easy to just specify an extra parameter. --- ansible/templates/crd.yml.j2 | 10 ++++++++++ deploy/awx-operator.yaml | 10 ++++++++++ deploy/crds/awx_v1beta1_crd.yaml | 10 ++++++++++ .../manifests/awx-operator.clusterserviceversion.yaml | 5 +++++ .../manifests/awx.ansible.com_awxs_crd.yaml | 10 ++++++++++ roles/installer/templates/tower_config.yaml.j2 | 4 ++++ 6 files changed, 49 insertions(+) diff --git a/ansible/templates/crd.yml.j2 b/ansible/templates/crd.yml.j2 index ce6054ec..ad8ca846 100644 --- a/ansible/templates/crd.yml.j2 +++ b/ansible/templates/crd.yml.j2 @@ -326,6 +326,16 @@ spec: description: AccessMode for the /var/lib/projects PersistentVolumeClaim default: ReadWriteMany type: string + extra_settings: + description: Extra settings to specify for the API + items: + properties: + setting: + type: string + value: + type: string + type: object + type: array type: object status: properties: diff --git a/deploy/awx-operator.yaml b/deploy/awx-operator.yaml index 06e0f3ca..2cd87de5 100644 --- a/deploy/awx-operator.yaml +++ b/deploy/awx-operator.yaml @@ -328,6 +328,16 @@ spec: description: AccessMode for the /var/lib/projects PersistentVolumeClaim default: ReadWriteMany type: string + extra_settings: + description: Extra settings to specify for the API + items: + properties: + setting: + type: string + value: + type: string + type: object + type: array type: object status: properties: diff --git a/deploy/crds/awx_v1beta1_crd.yaml b/deploy/crds/awx_v1beta1_crd.yaml index ce6054ec..ad8ca846 100644 --- a/deploy/crds/awx_v1beta1_crd.yaml +++ b/deploy/crds/awx_v1beta1_crd.yaml @@ -326,6 +326,16 @@ spec: description: AccessMode for the /var/lib/projects PersistentVolumeClaim default: ReadWriteMany type: string + extra_settings: + description: Extra settings to specify for the API + items: + properties: + setting: + type: string + value: + type: string + type: object + type: array type: object status: properties: diff --git a/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml b/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml index 8ff5cc73..de68442a 100644 --- a/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml +++ b/deploy/olm-catalog/awx-operator/manifests/awx-operator.clusterserviceversion.yaml @@ -380,6 +380,11 @@ spec: x-descriptors: - urn:alm:descriptor:com.tectonic.ui:advanced - urn:alm:descriptor:com.tectonic.ui:hidden + - displayName: API Extra Settings + path: extra_settings + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:advanced + - urn:alm:descriptor:com.tectonic.ui:hidden statusDescriptors: - description: Route to access the instance deployed displayName: URL diff --git a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml index 6898b450..57a52d6f 100644 --- a/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml +++ b/deploy/olm-catalog/awx-operator/manifests/awx.ansible.com_awxs_crd.yaml @@ -328,6 +328,16 @@ spec: type: string type: object type: object + extra_settings: + description: Extra settings to specify for the API + items: + properties: + setting: + type: string + value: + type: string + type: object + type: array type: object status: properties: diff --git a/roles/installer/templates/tower_config.yaml.j2 b/roles/installer/templates/tower_config.yaml.j2 index 8cb90a32..ff48b596 100644 --- a/roles/installer/templates/tower_config.yaml.j2 +++ b/roles/installer/templates/tower_config.yaml.j2 @@ -89,6 +89,10 @@ data: BROADCAST_WEBSOCKET_PORT = 8052 BROADCAST_WEBSOCKET_PROTOCOL = 'http' +{% for item in extra_settings | default([]) %} + {{ item.setting }} = {{ item.value }} +{% endfor %} + nginx_conf: | worker_processes 1; pid /tmp/nginx.pid;