robert 2 rokov pred
rodič
commit
34576ec3b8
1 zmenil súbory, kde vykonal 36 pridanie a 12 odobranie
  1. 36 12
      deploy.yaml

+ 36 - 12
deploy.yaml

@@ -75,6 +75,39 @@ spec:
             port: 8080
           initialDelaySeconds: 45
           periodSeconds: 15
+      - name: book-api-nginx
+        image: hub.evbj.easou.com/pro/book-api-nginx:v1.0.2
+        imagePullPolicy: IfNotPresent
+        ports:
+        - containerPort: 80
+          name: port
+        lifecycle:
+          preStop:
+            exec:
+              command: ["/bin/sh","-c","supervisorctl stop all"]
+        volumeMounts:
+        - name: volume
+          mountPath: /data
+        livenessProbe:
+          tcpSocket:
+            port: 80
+          initialDelaySeconds: 45
+          periodSeconds: 15
+        readinessProbe:
+          tcpSocket:
+            port: 80
+          initialDelaySeconds: 45
+          periodSeconds: 15
+      - name: book-api-flume
+        image: hub.evbj.easou.com/dev/book-api-flume:v1.0.1
+        imagePullPolicy: IfNotPresent
+        lifecycle:
+          preStop:
+            exec:
+              command: ["/bin/sh","-c","supervisorctl stop all"]
+        volumeMounts:
+        - name: volume
+          mountPath: /data
   updateStrategy:
     type: RollingUpdate
     rollingUpdate:
@@ -101,9 +134,8 @@ metadata:
 spec:
   type: NodePort
   ports:
-  - port: 8080
-    targetPort: 8080
-    nodePort: 32700
+  - port: 80
+    targetPort: 80
   selector:
     app: global-book-api
 ---
@@ -112,14 +144,6 @@ apiVersion: networking.k8s.io/v1
 metadata:
   name: global-book-api
   namespace: book-api
-  annotations:
-    nginx.ingress.kubernetes.io/enable-access-log: 'true'
-    nginx.ingress.kubernetes.io/configuration-snippet: |
-      #lua_need_request_body on;
-      #content_by_lua 'local s = ngx.var.request_body';
-      #log_format api.ieasou.cn 'v1{]api.ieasou.cn{]$request{]HHvDHAMjq2I{]$year$month$day $hour$minute$second{]$status{]-{]$request_time_usec{]$body_bytes_sent{]$bytes_sent{]$remote_addr{]$http_x_forwarded_for{]$http_referer{]$request_body{]$http_user_agent{]-{]uid{]$http_via{]v1';
-      access_log /var/log/nginx/api.ieasou.cn.access.log upstreaminfo;
-      error_log  /var/log/nginx/api.ieasou.cn.error.log;
 spec:
   tls:
     - hosts:
@@ -135,5 +159,5 @@ spec:
               service:
                 name: global-book-api-svc
                 port:
-                  number: 8080
+                  number: 80
   ingressClassName: nginx