From a73b11854996749d52301c922ca8681380fd03d0 Mon Sep 17 00:00:00 2001 From: Anthony Lin Date: Fri, 5 Jan 2018 03:12:07 +0000 Subject: [PATCH] Update DeckHand Chart - Multi-Threads/Workers This p.s. will allow multi-thread/worker parameters to be configurable in the Deckhand chart so that the values can be injected into the pod environment. This is a follow up to the comments made in [0]. Note also that we will need multiple workers in order to handle concurrent requests from Armada and DryDock to DeckHand for the rendered document. Multi-threads with single worker did not work as expected. Test results from our lab environment suggests that 4 single-threaded workers will be sufficient for our purpose. Hence we will use that as default override values for now. [0] https://review.gerrithub.io/#/c/393679/ Change-Id: I228713ec7b2ec305cbc2c761bc77125ea98e7dfa --- charts/deckhand/templates/deployment.yaml | 5 +++++ charts/deckhand/values.yaml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/charts/deckhand/templates/deployment.yaml b/charts/deckhand/templates/deployment.yaml index ae3a84fd..64276285 100644 --- a/charts/deckhand/templates/deployment.yaml +++ b/charts/deckhand/templates/deployment.yaml @@ -44,6 +44,11 @@ spec: {{ tuple $envAll $dependencies $mounts_deckhand_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: - name: deckhand + env: + - name: 'DECKHAND_API_WORKERS' + value: {{ .Values.conf.uwsgi.workers | default 4 | quote }} + - name: 'DECKHAND_API_THREADS' + value: {{ .Values.conf.uwsgi.threads | default 1 | quote }} image: {{ .Values.images.tags.deckhand }} imagePullPolicy: {{ .Values.images.pull_policy }} {{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} diff --git a/charts/deckhand/values.yaml b/charts/deckhand/values.yaml index 10128208..d4a8e44c 100644 --- a/charts/deckhand/values.yaml +++ b/charts/deckhand/values.yaml @@ -181,6 +181,9 @@ database: db_root_user: postgres conf: + uwsgi: + threads: 1 + workers: 4 policy: admin_api: role:admin deckhand:create_cleartext_documents: rule:admin_api