|
@@ -30,7 +30,7 @@ spec:
|
|
|
# app.touchrs: touchrs
|
|
|
containers:
|
|
|
- name: offline-process-promotion
|
|
|
- image: hub.evbj.easou.com/qa/offline-process-promotion:v1.0.38
|
|
|
+ image: hub.evbj.easou.com/qa/offline-process-promotion:v1.0.40
|
|
|
imagePullPolicy: Always
|
|
|
env:
|
|
|
- name: JAVA_OPTS
|
|
@@ -46,16 +46,16 @@ spec:
|
|
|
lifecycle:
|
|
|
preStop:
|
|
|
exec:
|
|
|
- command: ["/bin/sh","-c","curl -u amdin:ea1so2ua3dm4in5 -X POST 127.0.0.1:8080/actuator/shutdown"]
|
|
|
+ command: ["/bin/sh","-c","curl -X POST 127.0.0.1:8080/actuator/shutdown"]
|
|
|
livenessProbe:
|
|
|
httpGet:
|
|
|
path: /actuator/health
|
|
|
port: 8080
|
|
|
httpHeaders:
|
|
|
- - name: Custom-Header
|
|
|
- value: Awesome
|
|
|
- - name: Custom-Header
|
|
|
- value: Awesome
|
|
|
+ - name: Custom-Header
|
|
|
+ value: Awesome
|
|
|
+ - name: Custom-Header
|
|
|
+ value: Awesome
|
|
|
initialDelaySeconds: 30 #60s后启动第一次探测
|
|
|
periodSeconds: 10 # 每隔10s启动一次探测
|
|
|
timeoutSeconds: 3 # 超时时间3s
|
|
@@ -66,6 +66,23 @@ spec:
|
|
|
port: 8080
|
|
|
initialDelaySeconds: 30
|
|
|
periodSeconds: 15
|
|
|
+ - image: docker.elastic.co/beats/filebeat:6.8.12
|
|
|
+ imagePullPolicy: Always
|
|
|
+ name: filebeat
|
|
|
+ volumeMounts:
|
|
|
+ - name: volume #日志同时挂载在nginx和filebeat中
|
|
|
+ mountPath: /data
|
|
|
+ - name: filebeat-config
|
|
|
+ mountPath: /usr/share/filebeat/filebeat.yml
|
|
|
+ subPath: filebeat.yml
|
|
|
+ volumes:
|
|
|
+ - name: filebeat-config
|
|
|
+ configMap:
|
|
|
+ name: filebeat-config-offline-process-promotion
|
|
|
+ items:
|
|
|
+ - key: filebeat.yml
|
|
|
+ path: filebeat.yml
|
|
|
+
|
|
|
volumeClaimTemplates:
|
|
|
- metadata:
|
|
|
name: volume
|
|
@@ -107,4 +124,42 @@ spec:
|
|
|
- path: /
|
|
|
backend:
|
|
|
serviceName: offline-process-promotion-svc
|
|
|
- servicePort: 80
|
|
|
+ servicePort: 80
|
|
|
+---
|
|
|
+apiVersion: v1
|
|
|
+kind: ConfigMap
|
|
|
+metadata:
|
|
|
+ name: filebeat-config-offline-process-promotion
|
|
|
+ namespace: qa
|
|
|
+data:
|
|
|
+ filebeat.yml: |
|
|
|
+ filebeat.inputs:
|
|
|
+ - type: log
|
|
|
+ enabled: true
|
|
|
+ #多行合并
|
|
|
+ multiline.pattern: '^\[[0-9]{4}-[0-9]{2}-[0-9]{2}'
|
|
|
+ multiline.negate: true
|
|
|
+ multiline.match: after
|
|
|
+ multiline.timeout: 30
|
|
|
+ fields:
|
|
|
+ log_topic: offline-process-promotion
|
|
|
+ fields_under_root: true
|
|
|
+ paths:
|
|
|
+ - "/data/logs/app/*.log"
|
|
|
+ - "/data/logs/*.log"
|
|
|
+ setup.template.enabled: true
|
|
|
+ setup.template.name: offline-process-promotion
|
|
|
+ setup.template.pattern: offline-process-promotion*
|
|
|
+ setup.dashboards.enabled: true
|
|
|
+ output.kafka:
|
|
|
+ version: 0.10.2.1
|
|
|
+ enable: true
|
|
|
+ hosts: ["kafka-0.kafka-svc.qa.svc.cluster.local:9093", "kafka-1.kafka-svc.qa.svc.cluster.local:9093", "kafka-2.kafka-svc.qa.svc.cluster.local:9093"]
|
|
|
+ topic: 'offline-process-topic'
|
|
|
+ partition.round_robin:
|
|
|
+ reachable_only: false
|
|
|
+ required_acks: 0
|
|
|
+ compression: gzip
|
|
|
+ max_message_bytes: 1000000
|
|
|
+ setup.kibana:
|
|
|
+ host: 'qa-kibana.ieasou.cn:80'
|