From 2941a103c2dc0c31c387352ba0820034fba83724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E5=BC=BA?= Date: Mon, 9 May 2022 03:48:26 +0000 Subject: [PATCH] Add new file --- deploy.yaml | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 deploy.yaml diff --git a/deploy.yaml b/deploy.yaml new file mode 100644 index 0000000..81bd20c --- /dev/null +++ b/deploy.yaml @@ -0,0 +1,54 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + labels: + app: $IMAGES + name: $IMAGES + namespace: yanxuan +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: '0.5' + memory: 500Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + terminationGracePeriodSeconds: 30 +--- +kind: Service +apiVersion: v1 +metadata: + name: $IMAGES + namespace: yanxuan +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 80 + selector: + app: $IMAGES + type: ClusterIP