From fb57d48a0065887d897f5da3da30d1d2d012c5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E6=98=8C=E6=B3=A2?= Date: Sat, 2 Apr 2022 08:06:42 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..de1b3cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx +COPY dist /usr/share/nginx/html +EXPOSE 80 \ No newline at end of file From 44ee087e79385abd0143f80dcc2350cfd0fe6325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E6=98=8C=E6=B3=A2?= Date: Sat, 2 Apr 2022 08:22:21 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.yaml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 deploy.yaml diff --git a/deploy.yaml b/deploy.yaml new file mode 100644 index 0000000..1622bb9 --- /dev/null +++ b/deploy.yaml @@ -0,0 +1,58 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + labels: + app: $IMAGES + name: $IMAGES + namespace: yanxuan-h5 +spec: + progressDeadlineSeconds: 600 + replicas: 1 + selector: + matchLabels: + app: $IMAGES + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + template: + metadata: + labels: + app: $IMAGES + spec: + imagePullSecrets: + - name: aliyun-docker-hub + containers: + - image: '$REGISTRY/$DOCKERHUB_NAMESPACE/$IMAGES:$BUILD_NUMBER' + name: app + ports: + - containerPort: $JAR_PORD + protocol: TCP + resources: + limits: + cpu: '1' + memory: 1000Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + terminationGracePeriodSeconds: 30 +--- +kind: Service +apiVersion: v1 +metadata: + labels: + app: $IMAGES + name: $IMAGES + namespace: yanxuan-h5 +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + selector: + app: $IMAGES + sessionAffinity: None + type: ClusterIP \ No newline at end of file From 0fe5bcfb8937f1a90524d59c9c398d256acb3067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E6=98=8C=E6=B3=A2?= Date: Sat, 2 Apr 2022 08:23:32 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20deploy.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy.yaml b/deploy.yaml index 1622bb9..c18cb07 100644 --- a/deploy.yaml +++ b/deploy.yaml @@ -31,8 +31,8 @@ spec: protocol: TCP resources: limits: - cpu: '1' - memory: 1000Mi + cpu: '0.5' + memory: 500Mi terminationMessagePath: /dev/termination-log terminationMessagePolicy: File dnsPolicy: ClusterFirst @@ -55,4 +55,4 @@ spec: selector: app: $IMAGES sessionAffinity: None - type: ClusterIP \ No newline at end of file + type: ClusterIP From 14d3f192bcc57f055d048238afa242b7a29750ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E6=98=8C=E6=B3=A2?= Date: Sat, 2 Apr 2022 08:50:25 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20deploy.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy.yaml b/deploy.yaml index c18cb07..1840dd9 100644 --- a/deploy.yaml +++ b/deploy.yaml @@ -4,7 +4,7 @@ metadata: labels: app: $IMAGES name: $IMAGES - namespace: yanxuan-h5 + namespace: yanxuan spec: progressDeadlineSeconds: 600 replicas: 1 @@ -45,7 +45,7 @@ metadata: labels: app: $IMAGES name: $IMAGES - namespace: yanxuan-h5 + namespace: yanxuan spec: ports: - name: http