From dbfe1c728e47c46010bc69a3476fe9d149a91f96 Mon Sep 17 00:00:00 2001 From: zhangqy Date: Wed, 20 Sep 2023 11:59:29 +0800 Subject: [PATCH] =?UTF-8?q?[add]=E6=B7=BB=E5=8A=A0deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/qiuguo/gateway/deploy/deploy.yaml | 66 ++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 docker/qiuguo/gateway/deploy/deploy.yaml diff --git a/docker/qiuguo/gateway/deploy/deploy.yaml b/docker/qiuguo/gateway/deploy/deploy.yaml new file mode 100644 index 0000000..7c39516 --- /dev/null +++ b/docker/qiuguo/gateway/deploy/deploy.yaml @@ -0,0 +1,66 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: iot-gateway + name: iot-gateway + namespace: qiuguo-iot #一定要写名称空间 +spec: + progressDeadlineSeconds: 600 + replicas: 1 + selector: + matchLabels: + app: iot-gateway + strategy: + rollingUpdate: + maxSurge: 50% + maxUnavailable: 50% + type: RollingUpdate + template: + metadata: + labels: + app: iot-gateway + spec: + imagePullSecrets: + - name: aliyun-hub-register #提前在项目下配置访问阿里云的账号密码 + containers: + - image: $REGISTRY/$DOCKERHUB_NAMESPACE/qiuguo-iot:iot-gateway-SNAPSHOT-v1.0.0 + readinessProbe: + httpGet: + path: /actuator/health + port: 8080 + timeoutSeconds: 10 + failureThreshold: 30 + periodSeconds: 5 + imagePullPolicy: Always + name: app + ports: + - containerPort: 8080 + protocol: TCP + resources: + limits: + cpu: 300m + memory: 600Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + terminationGracePeriodSeconds: 30 +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: iot-gateway + name: iot-gateway + namespace: qiuguo-iot +spec: + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app: iot-gateway + sessionAffinity: None + type: ClusterIP