From 6434db57f6df80bc9b8de0efb0a902deecc7e08e Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 11 Sep 2024 14:42:39 +0800 Subject: [PATCH] 1 --- app/utils/sign_check.go | 3 +++ zyos-mall-deployment.yaml | 49 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 zyos-mall-deployment.yaml diff --git a/app/utils/sign_check.go b/app/utils/sign_check.go index 5c80ab1..2469e3b 100644 --- a/app/utils/sign_check.go +++ b/app/utils/sign_check.go @@ -104,6 +104,9 @@ func CheckUri(c *gin.Context) int { //} apiVersion = "0" } + if c.GetHeader("mp") == "jd" { + apiVersion = "0" + } return StrToInt(apiVersion) } diff --git a/zyos-mall-deployment.yaml b/zyos-mall-deployment.yaml new file mode 100644 index 0000000..03e4c77 --- /dev/null +++ b/zyos-mall-deployment.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: dev + name: zyos-mall + labels: + app: zyos-mall +spec: + replicas: 1 + template: + metadata: + name: zyos-mall + labels: + app: zyos-mall + spec: + containers: + - name: zyos-mall-container + image: registry-vpc.cn-shenzhen.aliyuncs.com/fnuoos-prd/zyos-mall:0.1 + ports: + - containerPort: 5002 + name: 5002tcp + protocol: TCP + resources: + limits: + cpu: "1" + memory: 256Mi + requests: + cpu: 200m + memory: 128Mi + imagePullPolicy: IfNotPresent + restartPolicy: Always + volumes: + - name: host-time + hostPath: + path: /etc/localtime + type: '' + - name: mall-cfg + configMap: + name: zyos-mall-cfg + defaultMode: 420 + selector: + matchLabels: + app: zyos-mall + + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25%