dengbiao 3 weeks ago
parent
commit
e0d2fb416f
3 changed files with 11 additions and 11 deletions
  1. +1
    -1
      consume/user_register_for_my_my_recommender.go
  2. +1
    -1
      consume/user_register_for_official_consume.go
  3. +9
    -9
      k8s/zyos-go-mq-consume-prd.yaml

+ 1
- 1
consume/user_register_for_my_my_recommender.go View File

@@ -142,7 +142,7 @@ func handleUserRegisterConsumeForMyRecommender(msgData []byte) error {
if err != nil { if err != nil {
return err return err
} }
if len(*userGroups) < 1000 {
if len(*userGroups) <= 1000 {
fansGroup = group fansGroup = group
} }
} }


+ 1
- 1
consume/user_register_for_official_consume.go View File

@@ -142,7 +142,7 @@ func handleUserRegisterConsumeForOfficial(msgData []byte) error {
"key": "group_id", "key": "group_id",
"value": group.GroupId, "value": group.GroupId,
}) })
if len(*userGroups) < 1000 {
if len(*userGroups) <= 1000 {
officialGroup = group officialGroup = group
} }
} }


+ 9
- 9
k8s/zyos-go-mq-consume-prd.yaml View File

@@ -2,10 +2,10 @@ kind: Deployment
apiVersion: apps/v1 apiVersion: apps/v1
# 元数据 # 元数据
metadata: metadata:
name: egg-go-mq-consume
name: egg-gim-go-mq-consume
namespace: egg namespace: egg
labels: labels:
app: egg-go-mq-consume
app: egg-gim-mq-consume
annotations: annotations:
kubesphere.io/creator: dengbiao kubesphere.io/creator: dengbiao
# deployment主要部分 # deployment主要部分
@@ -14,12 +14,12 @@ spec:
selector: selector:
matchLabels: matchLabels:
# 名称与上面的labels对应 # 名称与上面的labels对应
app: egg-go-mq-consume
app: egg-gim-mq-consume
template: template:
metadata: metadata:
labels: labels:
# 名称与上面的matchLabels对应 # 名称与上面的matchLabels对应
app: egg-go-mq-consume
app: egg-gim-mq-consume
spec: spec:
# 声明挂载卷(将外部已存在的pvc、config等挂载进来) # 声明挂载卷(将外部已存在的pvc、config等挂载进来)
volumes: volumes:
@@ -29,22 +29,22 @@ spec:
path: /etc/localtime path: /etc/localtime
type: '' type: ''
# 将前面创建的configMap也挂载进来 # 将前面创建的configMap也挂载进来
- name: egg-go-mq-consume-cfg
- name: egg-gim-mq-consume-cfg
configMap: configMap:
# 这里的名字就是前面创建的configMap的名字 # 这里的名字就是前面创建的configMap的名字
name: egg-go-mq-consume-cfg
name: egg-gim-mq-consume-cfg
defaultMode: 420 defaultMode: 420
containers: containers:
# 主容器 # 主容器
- name: egg-go-mq-consume
- name: egg-gim-mq-consume
# 镜像地址(提前打包好并推送的镜像仓库) # 镜像地址(提前打包好并推送的镜像仓库)
image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/egg-go-mq-consume:0.0.1'
image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/egg-gim-mq-consume:0.0.1'
# 将前面volume声明的需要用到的pvc、config挂载上来 # 将前面volume声明的需要用到的pvc、config挂载上来
volumeMounts: volumeMounts:
- name: host-time - name: host-time
readOnly: true readOnly: true
mountPath: /etc/localtime mountPath: /etc/localtime
- name: egg-go-mq-consume-cfg # 该名字对应前面volumes声明的名字
- name: egg-gim-mq-consume-cfg # 该名字对应前面volumes声明的名字
readOnly: true readOnly: true
# 挂载到容器的哪个路径 # 挂载到容器的哪个路径
mountPath: /var/egg mountPath: /var/egg


Loading…
Cancel
Save