From d8c0a82411ef7d1f07298fe99697a74c8e81285e Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 26 May 2022 10:06:56 +0800 Subject: [PATCH] ingress --- deploy_k8s/ingress.yaml | 20 ++++++++++---------- deploy_k8s/k8s_openim_deploy.md | 2 ++ internal/rpc/group/group.go | 6 +++--- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/deploy_k8s/ingress.yaml b/deploy_k8s/ingress.yaml index 460cdc588..0f5eb74ff 100644 --- a/deploy_k8s/ingress.yaml +++ b/deploy_k8s/ingress.yaml @@ -9,7 +9,7 @@ metadata: name: sdk-server-ingress spec: rules: - - host: k8s.open-im-test.rentsoft.cn + - host: sdk-server.openim.xxx.com http: paths: - backend: @@ -17,7 +17,7 @@ spec: name: sdk-server port: number: 10003 - path: /sdk-server + path: / pathType: Prefix --- apiVersion: networking.k8s.io/v1 @@ -30,7 +30,7 @@ metadata: name: msg-gateway-ingress spec: rules: - - host: k8s.open-im-test.rentsoft.cn + - host: msg-gateway.openim.xxx.com http: paths: - backend: @@ -38,7 +38,7 @@ spec: name: msg-gateway port: number: 10001 - path: /msg-gateway + path: / pathType: Prefix --- apiVersion: networking.k8s.io/v1 @@ -47,7 +47,7 @@ metadata: name: api-ingress spec: rules: - - host: k8s.open-im-test.rentsoft.cn + - host: api.openim.xxx.com http: paths: - backend: @@ -55,7 +55,7 @@ spec: name: api port: number: 10002 - path: /api + path: / pathType: Prefix --- apiVersion: networking.k8s.io/v1 @@ -64,7 +64,7 @@ metadata: name: demo-ingress spec: rules: - - host: k8s.open-im-test.rentsoft.cn + - host: demo.openim.xxx.com http: paths: - backend: @@ -72,7 +72,7 @@ spec: name: demo port: number: 10004 - path: /demo + path: / pathType: Prefix --- apiVersion: networking.k8s.io/v1 @@ -81,7 +81,7 @@ metadata: name: cms-api-ingress spec: rules: - - host: k8s.open-im-test.rentsoft.cn + - host: cms-api.openim.xxx.com http: paths: - backend: @@ -89,5 +89,5 @@ spec: name: cms-api port: number: 10006 - path: /cms-api + path: / pathType: Prefix diff --git a/deploy_k8s/k8s_openim_deploy.md b/deploy_k8s/k8s_openim_deploy.md index 57f85600a..d4ccb4bfe 100644 --- a/deploy_k8s/k8s_openim_deploy.md +++ b/deploy_k8s/k8s_openim_deploy.md @@ -25,8 +25,10 @@ jssdk 需要在sdk_server/deployment.yaml修改启动端口等 域名修改等操作 ### 5. 执行./kubectl_start.sh脚本 +需要安装ingress controller chmod +x ./kubectl_start.sh ./kubectl_stop.sh ./kubectl_start.sh +kubectl -n openim apply -f ingress.yaml kubectl 启动所有deployment,services,ingress ### 6. 查看k8s deployment service ingress状态 diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 22fcc61af..57faf3fe2 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -379,11 +379,11 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro } for _, v := range memberList { - log.Debug(req.OperationID, v) + //log.Debug(req.OperationID, v) var node open_im_sdk.GroupMemberFullInfo cp.GroupMemberDBCopyOpenIM(&node, &v) - log.Debug(req.OperationID, "db value:", v.MuteEndTime, "seconds: ", v.MuteEndTime.Unix()) - log.Debug(req.OperationID, "cp value: ", node) + //log.Debug(req.OperationID, "db value:", v.MuteEndTime, "seconds: ", v.MuteEndTime.Unix()) + //log.Debug(req.OperationID, "cp value: ", node) resp.MemberList = append(resp.MemberList, &node) } log.NewInfo(req.OperationID, "GetGroupAllMember rpc return ", resp.String())