From c0feddcca8f545acfae3ddf908ae6782160bdf5c Mon Sep 17 00:00:00 2001 From: "Chang, Hui-Tang" Date: Wed, 6 Sep 2023 20:54:26 +0800 Subject: [PATCH] chore(helm,docker-compose,env): update mgmt-backend env in helm charts and docker-compose --- .env | 1 + charts/vdp/templates/api-gateway-vdp/configmap.yaml | 4 ++++ charts/vdp/templates/api-gateway-vdp/deployment.yaml | 5 +++++ docker-compose.yml | 2 ++ 4 files changed, 12 insertions(+) diff --git a/.env b/.env index 6c936e89..b1a9871b 100644 --- a/.env +++ b/.env @@ -65,6 +65,7 @@ MODEL_BACKEND_PUBLICPORT=8083 # mgmt-backend MGMT_BACKEND_HOST=mgmt-backend MGMT_BACKEND_PRIVATEPORT=3084 +MGMT_BACKEND_PUBLICPORT=8084 # controller-vdp CONTROLLER_VDP_IMAGE=instill/controller-vdp diff --git a/charts/vdp/templates/api-gateway-vdp/configmap.yaml b/charts/vdp/templates/api-gateway-vdp/configmap.yaml index e73c587b..2882f698 100644 --- a/charts/vdp/templates/api-gateway-vdp/configmap.yaml +++ b/charts/vdp/templates/api-gateway-vdp/configmap.yaml @@ -26,6 +26,10 @@ data: CONNECTOR_BACKEND_HOST={{ template "vdp.connectorBackend" . }} CONNECTOR_BACKEND_PUBLICPORT={{ template "vdp.connectorBackend.publicPort" . }} + # mgmt-backend + MGMT_BACKEND_HOST={{ template "base.mgmtBackend" . }} + MGMT_BACKEND_PUBLICPORT={{ template "base.mgmtBackend.publicPort" . }} + # influxdb INFLUXDB_HOST={{ template "base.influxdb" . }} INFLUXDB_PORT={{ template "base.influxdb.port" . }} diff --git a/charts/vdp/templates/api-gateway-vdp/deployment.yaml b/charts/vdp/templates/api-gateway-vdp/deployment.yaml index 2d5e56f4..341f8247 100644 --- a/charts/vdp/templates/api-gateway-vdp/deployment.yaml +++ b/charts/vdp/templates/api-gateway-vdp/deployment.yaml @@ -52,6 +52,7 @@ spec: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${PIPELINE_BACKEND_HOST}:${PIPELINE_BACKEND_PORT}/v1alpha/health/pipeline)" != "200" ]]; do echo waiting for pipeline-backend; sleep 1; done && while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${CONNECTOR_BACKEND_HOST}:${CONNECTOR_BACKEND_PORT}/v1alpha/health/connector)" != "200" ]]; do echo waiting for connector-backend; sleep 1; done && while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${CONTROLLER_VDP_HOST}:${CONTROLLER_VDP_PORT}/v1alpha/health/controller)" != "200" ]]; do echo waiting for controller-vdp; sleep 1; done && + while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${MGMT_BACKEND_HOST}:${MGMT_BACKEND_PORT}/v1alpha/health/mgmt)" != "200" ]]; do echo waiting for mgmt-backend; sleep 1; done && while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${INFLUXDB_HOST}:${INFLUXDB_PORT}/health)" != "200" ]]; do echo waiting for influxdb; sleep 1; done env: - name: PIPELINE_BACKEND_HOST @@ -66,6 +67,10 @@ spec: value: "{{ template "vdp.controllerVDP" . }}" - name: CONTROLLER_VDP_PORT value: "{{ template "vdp.controllerVDP.privatePort" . }}" + - name: MGMT_BACKEND_HOST + value: "{{ template "base.mgmtBackend" . }}" + - name: MGMT_BACKEND_PORT + value: "{{ template "base.mgmtBackend.publicPort" . }}" - name: INFLUXDB_HOST value: "{{ template "base.influxdb" . }}" - name: INFLUXDB_PORT diff --git a/docker-compose.yml b/docker-compose.yml index 67025721..ba387e5f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,6 +27,8 @@ services: PIPELINE_BACKEND_PUBLICPORT: ${PIPELINE_BACKEND_PUBLICPORT} CONNECTOR_BACKEND_HOST: ${CONNECTOR_BACKEND_HOST} CONNECTOR_BACKEND_PUBLICPORT: ${CONNECTOR_BACKEND_PUBLICPORT} + MGMT_BACKEND_HOST: ${MGMT_BACKEND_HOST} + MGMT_BACKEND_PUBLICPORT: ${MGMT_BACKEND_PUBLICPORT} INFLUXDB_HOST: ${INFLUXDB_HOST} INFLUXDB_PORT: ${INFLUXDB_PORT} JAEGER_ENABLED: ${OBSERVE_ENABLED}