From e411a92903a82ffa578a9060cde16f9a198f36a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E8=89=B3?= Date: Sat, 20 Nov 2021 21:25:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=8B=E8=BE=BEk8s?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deliverables/k8s/fangjia-youda-manager.yaml | 77 +++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 deliverables/k8s/fangjia-youda-manager.yaml diff --git a/deliverables/k8s/fangjia-youda-manager.yaml b/deliverables/k8s/fangjia-youda-manager.yaml new file mode 100644 index 000000000..28ae4b99b --- /dev/null +++ b/deliverables/k8s/fangjia-youda-manager.yaml @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: fangjia-youda-manager + namespace: fangjia +spec: + replicas: 1 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + revisionHistoryLimit: 5 + selector: + matchLabels: + project: fangjia-youda-manager + app: fangjia + template: + metadata: + labels: + project: fangjia-youda-manager + app: fangjia + spec: + imagePullSecrets: + - name: nexus-registry-secret + nodeSelector: + app: fangjia + containers: + - name: fangjia-youda-manager + image: 192.168.0.19:9012/fangjia-youda-manager:1.1 + imagePullPolicy: Always + ports: + - containerPort: 8080 + name: web + protocol: TCP + readinessProbe: + httpGet: + path: /login + port: web + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /login + port: web + initialDelaySeconds: 10 + periodSeconds: 5 + volumeMounts: + - name: host-time + mountPath: /etc/localtime + - name: goojiaconfig + mountPath: /home/goojia/goojiaconfig + - name: logs + mountPath: /home/goojia/logs + + volumes: + - name: host-time + hostPath: + path: /etc/localtime +--- +apiVersion: v1 +kind: Service +metadata: + name: fangjia-youda-manager + namespace: fangjia + labels: + project: fangjia-youda-manager + app: fangjia +spec: + type: NodePort + selector: + project: fangjia-youda-manager + app: fangjia + ports: + - port: 8080 + targetPort: 8080 + nodePort: 30006 \ No newline at end of file