From: Bin Yang Date: Tue, 15 Nov 2022 01:48:24 +0000 (+0800) Subject: Fix hostname issue X-Git-Tag: 2.0.0-rc2~23^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=c6d1010ba670d6b01876ee3d46c8364ccc530c4a;p=pti%2Fo2.git Fix hostname issue Issue-ID: INF-360 Signed-off-by: Bin Yang Change-Id: If259ab9a52c27e461ad85540ab50effba2346bb4 --- diff --git a/charts/resources/scripts/init/o2api_start.sh b/charts/resources/scripts/init/o2api_start.sh index 9b376f4..c1b239d 100644 --- a/charts/resources/scripts/init/o2api_start.sh +++ b/charts/resources/scripts/init/o2api_start.sh @@ -24,11 +24,11 @@ # pip install -e /root/o2 pip install -e /src -cat <>/etc/hosts -127.0.0.1 api -127.0.0.1 postgres -127.0.0.1 redis -EOF +# cat <>/etc/hosts +# 127.0.0.1 api +# 127.0.0.1 postgres +# 127.0.0.1 redis +# EOF flask run --host=0.0.0.0 --port=80 --cert /configs/server.crt --key /configs/server.key diff --git a/charts/templates/deployment.yaml b/charts/templates/deployment.yaml index 98dc174..7d110cb 100644 --- a/charts/templates/deployment.yaml +++ b/charts/templates/deployment.yaml @@ -68,7 +68,7 @@ spec: command: ["/bin/bash", "/opt/o2pubsub_start.sh"] env: - name: DB_HOST - value: postgres + value: localhost - name: DB_PASSWORD value: o2ims123 - name: LOGGING_CONFIG_LEVEL @@ -82,7 +82,7 @@ spec: - name: PYTHONDONTWRITEBYTECODE value: "1" - name: REDIS_HOST - value: redis + value: localhost - name: K8S_KUBECONFIG value: {{ .Values.ocloud.K8S_KUBECONFIG }} volumeMounts: @@ -102,7 +102,7 @@ spec: - name: API_HOST_EXTERNAL_FLOATING value: {{ .Values.ocloud.API_HOST_EXTERNAL_FLOATING }} - name: DB_HOST - value: postgres + value: localhost - name: DB_PASSWORD value: o2ims123 - name: LOGGING_CONFIG_LEVEL @@ -116,7 +116,7 @@ spec: - name: PYTHONDONTWRITEBYTECODE value: "1" - name: REDIS_HOST - value: redis + value: localhost volumeMounts: - name: scripts mountPath: /opt @@ -132,7 +132,7 @@ spec: - name: API_HOST_EXTERNAL_FLOATING value: {{ .Values.ocloud.API_HOST_EXTERNAL_FLOATING }} - name: DB_HOST - value: postgres + value: localhost - name: DB_PASSWORD value: o2ims123 - name: FLASK_APP @@ -149,7 +149,7 @@ spec: - name: PYTHONUNBUFFERED value: "1" - name: REDIS_HOST - value: redis + value: localhost - name: HELM_USER_PASSWD value: {{ .Values.ocloud.HELM_USER_PASSWD }} command: ["/bin/bash", "/opt/o2api_start.sh"]