From 28adbb5d06e3a20c28b6f36a492c2e02442fce4f Mon Sep 17 00:00:00 2001 From: BrandonSharratt Date: Thu, 13 Feb 2020 13:01:34 -0800 Subject: [PATCH] add support for adminGroup to request api docker container and helm deployment --- helm/ocwa/values.yaml | 1 + microservices/requestApi/entrypoint.sh | 1 + .../requestApi/helm/request-api/templates/deployment.yaml | 3 +++ microservices/requestApi/helm/request-api/values.yaml | 1 + terraform/ocwa_request_api.tf | 3 ++- 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/helm/ocwa/values.yaml b/helm/ocwa/values.yaml index 32bb8dd91..84c09f458 100644 --- a/helm/ocwa/values.yaml +++ b/helm/ocwa/values.yaml @@ -394,6 +394,7 @@ request-api: formioUsername: "admin@example.com" formioPassword: "CHANGEME" orgAttribute: "businessCategory" + adminGroup: "admin" resources: {} diff --git a/microservices/requestApi/entrypoint.sh b/microservices/requestApi/entrypoint.sh index dd6df4eb9..982aea590 100644 --- a/microservices/requestApi/entrypoint.sh +++ b/microservices/requestApi/entrypoint.sh @@ -67,6 +67,7 @@ printf "\"webhookSecret\": \"${WEBHOOK_API_KEY}\",\n" >> ./config/default.json printf "\"emailOnInitialSubmit\": ${EMAIL_ON_SUBMIT},\n" >> ./config/default.json printf "\"orgAttribute\": \"${ORG_ATTRIBUTE}\",\n" >> ./config/default.json +printf "\"adminGroup\": \"${ADMIN_GROUP}\",\n" >> ./config/default.json printf "\"user\": {\n" >> ./config/default.json printf "\"idField\": \"${USER_ID_FIELD}\",\n" >> ./config/default.json diff --git a/microservices/requestApi/helm/request-api/templates/deployment.yaml b/microservices/requestApi/helm/request-api/templates/deployment.yaml index a454dd259..4a3125041 100644 --- a/microservices/requestApi/helm/request-api/templates/deployment.yaml +++ b/microservices/requestApi/helm/request-api/templates/deployment.yaml @@ -181,6 +181,9 @@ spec: - name: ORG_ATTRIBUTE value: "{{ .Values.orgAttribute }}" + + - name: ADMIN_GROUP + value: "{{ .Values.adminGroup }}" ports: - name: http diff --git a/microservices/requestApi/helm/request-api/values.yaml b/microservices/requestApi/helm/request-api/values.yaml index 443b39fb4..16193d3de 100644 --- a/microservices/requestApi/helm/request-api/values.yaml +++ b/microservices/requestApi/helm/request-api/values.yaml @@ -109,6 +109,7 @@ formioUrl: "http://ocwa-formio.ocwa" formioUsername: "admin@example.com" formioPassword: "CHANGEME" orgAttribute: "businessCategory" +adminGroup: "admin" resources: {} # If you want to specify resources, uncomment the following diff --git a/terraform/ocwa_request_api.tf b/terraform/ocwa_request_api.tf index f91d49aab..e70257692 100644 --- a/terraform/ocwa_request_api.tf +++ b/terraform/ocwa_request_api.tf @@ -72,7 +72,8 @@ resource "docker_container" "ocwa_request_api" { "FORMIO_URL=http://ocwa_formio:3001", "FORMIO_USERNAME=admin@example.com", "FORMIO_PASSWORD=CHANGEME", - "ORG_ATTRIBUTE=businessCategory" + "ORG_ATTRIBUTE=businessCategory", + "ADMIN_GROUP=admin" ] }