Set the API port from chart env var

For the deployment of armada, the entrypoint.sh needs to have
the exposed uwsgi port matching the deployment of the api pod.
This change sets the value in the pod.env.armada_api seciton
so that the environment variable is set up by the chart rather
than relying upon the default value set in the entrypoint.sh
script.

Change-Id: I7535abac7c252f5c65447476e02f8eb54647e966
This commit is contained in:
Bryan Strassner 2018-02-23 11:10:04 -06:00 committed by Scott Hussey
parent 3b879fc846
commit 9e81a317e2
2 changed files with 5 additions and 2 deletions

View File

@ -152,6 +152,9 @@ conf:
pod:
env:
armada_api:
# ARMADA_API_PORT should = conf.armada.armada_api.bind_port in standard cases
- name: ARMADA_API_PORT
value: 8000
# - name: http_proxy
# value: http://proxy.example.com:8080
# - name: https_proxy

View File

@ -19,7 +19,7 @@ set -ex
CMD="armada"
# Define port
PORT=${PORT:-9000}
PORT=${ARMADA_API_PORT:-9000}
# How long uWSGI should wait for each Armada response
ARMADA_API_TIMEOUT=${ARMADA_API_TIMEOUT:-"3600"}
# Number of uWSGI workers to handle API requests
@ -32,7 +32,7 @@ ARMADA_API_THREADS=${ARMADA_API_THREADS:-"1"}
# server during import in `armada.api.server`.
if [ "$1" = 'server' ]; then
exec uwsgi \
--http :${PORT} \
--http :${ARMADA_API_PORT} \
--http-timeout $ARMADA_API_TIMEOUT \
--enable-threads \
-L \