root пре 2 година
родитељ
комит
53ee12dbec
2 измењених фајлова са 14 додато и 7 уклоњено
  1. 7 4
      deploy-canary.yaml
  2. 7 3
      deploy.yaml

+ 7 - 4
deploy-canary.yaml

@@ -27,7 +27,6 @@ spec:
       dnsConfig:
         nameservers:
           - 10.26.22.50
-          - 223.5.5.5
       initContainers:
         - name: init
           image: hub.evbj.easou.com/dev/busybox
@@ -38,7 +37,7 @@ spec:
             mountPath: /data
         - name: init-package
           image: hub.evbj.easou.com/dev/busybox
-          command: ['sh', '-c', 'rm -rf /data/project/* && wget http://10.26.22.190/release/app-web/prod-64/esbookweb/1.5.416/esbookweb_1.5.416_changeSearchEnv_T1.5.413-180117_1.5.416_20220829-163114_RBL/ROOT.war -O /data/project/ROOT.war']
+          command: ['sh', '-c', 'rm -rf /data/project/* && wget http://10.26.22.190/release/app-web/prod-64/esbookweb/1.5.416/esbookweb_1.5.416_changeSearchEnv_T1.5.413-180117_1.5.416_20220829-163114_RBL/ROOT.war -O /data/project/ROOT.war && md5sum  /data/project/ROOT.war']
           imagePullPolicy: IfNotPresent
           volumeMounts:
           - name: volume
@@ -50,18 +49,22 @@ spec:
         ports:
         - containerPort: 8080
           name: port
+        lifecycle:
+          preStop:
+            exec:
+              command: ["/bin/sh","-c","supervisorctl stop all"]
         volumeMounts:
         - name: volume
           mountPath: /data
         livenessProbe:
           tcpSocket:
             port: 8080
-          initialDelaySeconds: 45
+          initialDelaySeconds: 60
           periodSeconds: 15
         readinessProbe:
           tcpSocket:
             port: 8080
-          initialDelaySeconds: 45
+          initialDelaySeconds: 60
           periodSeconds: 15
   updateStrategy:
     type: RollingUpdate

+ 7 - 3
deploy.yaml

@@ -9,7 +9,7 @@ metadata:
     app: book-webview
 spec:
   serviceName: book-webview
-  replicas: 2
+  replicas: 3
   selector:
     matchLabels:
       app: book-webview
@@ -20,7 +20,7 @@ spec:
     spec:
       readinessGates:
       - conditionType: InPlaceUpdateReady
-      terminationGracePeriodSeconds: 180
+      terminationGracePeriodSeconds: 30
       dnsPolicy: ClusterFirstWithHostNet
       dnsConfig:
         nameservers:
@@ -36,7 +36,7 @@ spec:
             mountPath: /data
         - name: init-package
           image: hub.evbj.easou.com/dev/busybox
-          command: ['sh', '-c', 'rm -rf /data/project/* && wget http://10.26.22.190/release/app-web/prod-64/esbookweb/1.5.416/esbookweb_1.5.416_changeSearchEnv_T1.5.413-180117_1.5.416_20220829-163114_RBL/ROOT.war -O /data/project/ROOT.war']
+          command: ['sh', '-c', 'rm -rf /data/project/* && wget http://10.26.22.190/release/app-web/prod-64/esbookweb/1.5.416/esbookweb_1.5.416_changeSearchEnv_T1.5.413-180117_1.5.416_20220829-163114_RBL/ROOT.war -O /data/project/ROOT.war && md5sum  /data/project/ROOT.war']
           imagePullPolicy: IfNotPresent
           volumeMounts:
           - name: volume
@@ -48,6 +48,10 @@ spec:
         ports:
         - containerPort: 8080
           name: port
+        lifecycle:
+          preStop:
+            exec:
+              command: ["/bin/sh","-c","supervisorctl stop all"] 
         volumeMounts:
         - name: volume
           mountPath: /data