diff --git a/consume/withdraw_consume.go b/consume/withdraw_consume.go index 0f9ae1f..73b6869 100644 --- a/consume/withdraw_consume.go +++ b/consume/withdraw_consume.go @@ -71,7 +71,11 @@ func handleWithdrawConsume(msgData []byte) error { } fmt.Println("message:::::::::::>>>>>>>>>") fmt.Println(msg) - post, err := utils.CurlPost("http://admin.99813608.zhiyingos.com/index/transfer", msg, nil) + var url = "http://admin.99813608.zhiyingos.com/index/transfer" + if cfg.Prd { + url = "http://zhios-admin" + } + post, err := utils.CurlPost(url, msg, nil) if err != nil { return err } diff --git a/k8s/zyos-go-mq-consume-prd.yaml b/k8s/zyos-go-mq-consume-prd.yaml index b65a631..1d6e3c8 100644 --- a/k8s/zyos-go-mq-consume-prd.yaml +++ b/k8s/zyos-go-mq-consume-prd.yaml @@ -2,10 +2,10 @@ kind: Deployment apiVersion: apps/v1 # 元数据 metadata: - name: zyos-go-mq-consume + name: zyos-go-mq-consume-v5 namespace: zhios labels: - app: zyos-go-mq-consume + app: zyos-go-mq-consume-v5 annotations: kubesphere.io/creator: dengbiao kubesphere.io/description: 只用go版本rabbitmq消费项目 @@ -15,12 +15,12 @@ spec: selector: matchLabels: # 名称与上面的labels对应 - app: zyos-go-mq-consume + app: zyos-go-mq-consume-v5 template: metadata: labels: # 名称与上面的matchLabels对应 - app: zyos-go-mq-consume + app: zyos-go-mq-consume-v5 spec: # 声明挂载卷(将外部已存在的pvc、config等挂载进来) volumes: @@ -37,9 +37,9 @@ spec: defaultMode: 420 containers: # 主容器 - - name: zhios-zyos-go-mq-consume-container + - name: zhios-zyos-go-mq-consume-v5-container # 镜像地址(提前打包好并推送的镜像仓库) - image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/zyos-zyos-go-mq-consume:0.1' + image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/zyos-zyos-go-mq-consume-v5:20240308-01' # 将前面volume声明的需要用到的pvc、config挂载上来 volumeMounts: - name: host-time