From 694739cdbc206517247c205f44cec2f345147f78 Mon Sep 17 00:00:00 2001
From: cheliequan <liequanche@126.com>
Date: 星期二, 06 六月 2023 12:14:45 +0800
Subject: [PATCH] 更新代码

---
 src/k8s/create.go                |   17 +++++++++--------
 build/Dockerfile                 |    1 +
 build/apsServer/conf/config.yaml |    8 ++++----
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/build/Dockerfile b/build/Dockerfile
index 1ee8268..156fa60 100644
--- a/build/Dockerfile
+++ b/build/Dockerfile
@@ -44,6 +44,7 @@
 
 # 瀹瑰櫒鍚戝鎻愪緵鏈嶅姟鐨勬毚闇茬鍙�
 EXPOSE 9081
+EXPOSE 9091
 
 # 鍚姩OpenResty鏈嶅姟
 #CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"]
diff --git a/build/apsServer/conf/config.yaml b/build/apsServer/conf/config.yaml
index 3f81704..e0a7eaf 100644
--- a/build/apsServer/conf/config.yaml
+++ b/build/apsServer/conf/config.yaml
@@ -1,20 +1,20 @@
 web:
   port: 9081
   host: 0.0.0.0
-  aphost: 192.168.20.119
+  aphost: 0.0.0.0
   apport: 9091
   alport: 9090
-  alhost: 192.168.20.119
+  alhost: 0.0.0.0
   jwtSecret: lzhlmcl,yhblsqt.
 db:
-  dsn: root:c++java123@tcp(192.168.20.119:3306)/aps_server2?charset=utf8&parseTime=True&loc=Local
+  dsn: 
   logMode: true
   maxIdleCon: 50
   maxOpenCon: 200
   connMaxLifeTimeSecond: 120
   connMaxIdleTimeSecond: 3600
 registry:
-  etcdAddr: 192.168.20.247:2379
+  etcdAddr: 172.20.11.128:2379
   keyPrefix: /aps/apsServer/node/
 log:
   path: ./logs/aps-server.log
diff --git a/src/k8s/create.go b/src/k8s/create.go
index aa5884d..c57539f 100644
--- a/src/k8s/create.go
+++ b/src/k8s/create.go
@@ -211,19 +211,20 @@
 					Containers: []apiv1.Container{
 						{
 							Name:  namespace,
-							Image: "192.168.20.119/apsserver/apsserver:v0.5",
+							Image: "harbor.smartai.com/apsserver/apsserver:v0.1",
 							Env: []apiv1.EnvVar{
 								{
-									Name:  "NODE_PORT1",
+									Name:  "GRPC_PORT",
 									Value: port1,
 								},
-								{
-									Name:  "NODE_PORT2",
-									Value: port2,
-								},
+								// todo 浠庨厤缃枃浠朵腑璇诲彇
 								{
 									Name:  "DB_HOST",
-									Value: "localhost",
+									Value: "172.20.11.128",
+								},
+								{
+									Name:  "GRPC_HOST",
+									Value: "0.0.0.0",
 								},
 								{
 									Name:  "DB_NAME",
@@ -397,7 +398,7 @@
 	if len(svc.Spec.Ports) > 0 {
 		for _, p := range svc.Spec.Ports {
 			// return tcp port
-			if p.Name == "tcp" {
+			if p.Name == "http" {
 				return p.NodePort, nil
 			}
 		}

--
Gitblit v1.8.0