|
@@ -1,169 +0,0 @@
|
|
|
----
|
|
|
-apiVersion: apps/v1
|
|
|
-kind: StatefulSet
|
|
|
-metadata:
|
|
|
- name: offline-process-charge
|
|
|
- namespace: qa
|
|
|
- labels:
|
|
|
- app: offline-process-charge
|
|
|
-spec:
|
|
|
- serviceName: offline-process-charge
|
|
|
- replicas: 1
|
|
|
- selector:
|
|
|
- matchLabels:
|
|
|
- app: offline-process-charge
|
|
|
- template:
|
|
|
- metadata:
|
|
|
- labels:
|
|
|
- app: offline-process-charge
|
|
|
- spec:
|
|
|
- terminationGracePeriodSeconds: 60
|
|
|
- initContainers:
|
|
|
- - name: init
|
|
|
- image: hub.evbj.easou.com/dev/busybox
|
|
|
- command: [ "chmod","777","-R","/data" ]
|
|
|
- imagePullPolicy: Always
|
|
|
- volumeMounts:
|
|
|
- - name: volume
|
|
|
- mountPath: /data
|
|
|
- #nodeSelector:
|
|
|
- # app.touchrs: touchrs
|
|
|
- containers:
|
|
|
- - name: offline-process-charge
|
|
|
- image: hub.evbj.easou.com/qa/offline-process-charge:v1.0.41
|
|
|
- imagePullPolicy: Always
|
|
|
- env:
|
|
|
- - name: JAVA_OPTS
|
|
|
- value: "-server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=n -Xmx2g -Xms2g -Xss512k -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=test"
|
|
|
- ports:
|
|
|
- - containerPort: 8080
|
|
|
- name: port
|
|
|
- - containerPort: 8001
|
|
|
- name: "jvm-debug"
|
|
|
- volumeMounts:
|
|
|
- - name: volume
|
|
|
- mountPath: /data
|
|
|
- lifecycle:
|
|
|
- preStop:
|
|
|
- exec:
|
|
|
- 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
|
|
|
- initialDelaySeconds: 30 #60s后启动第一次探测
|
|
|
- periodSeconds: 10 # 每隔10s启动一次探测
|
|
|
- timeoutSeconds: 3 # 超时时间3s
|
|
|
- successThreshold: 1 # 成功1次即表示容器健康
|
|
|
- failureThreshold: 5 # 连续5次失败,则判定容器不健康,默认3次
|
|
|
- readinessProbe:
|
|
|
- tcpSocket:
|
|
|
- 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-charge
|
|
|
- items:
|
|
|
- - key: filebeat.yml
|
|
|
- path: filebeat.yml
|
|
|
-
|
|
|
- volumeClaimTemplates:
|
|
|
- - metadata:
|
|
|
- name: volume
|
|
|
- spec:
|
|
|
- accessModes: [ "ReadWriteOnce" ]
|
|
|
- storageClassName: rbd
|
|
|
- resources:
|
|
|
- requests:
|
|
|
- storage: 100Gi
|
|
|
----
|
|
|
-apiVersion: v1
|
|
|
-kind: Service
|
|
|
-metadata:
|
|
|
- name: offline-process-charge-svc
|
|
|
- namespace: qa
|
|
|
- labels:
|
|
|
- app: offline-process-charge-svc
|
|
|
-spec:
|
|
|
- type: NodePort
|
|
|
- ports:
|
|
|
- - port: 80
|
|
|
- targetPort: 8080
|
|
|
- name: "main"
|
|
|
- selector:
|
|
|
- app: offline-process-charge
|
|
|
----
|
|
|
-apiVersion: extensions/v1beta1
|
|
|
-kind: Ingress
|
|
|
-metadata:
|
|
|
- name: offline-process-charge-ingress
|
|
|
- namespace: qa
|
|
|
- annotations:
|
|
|
- kubernetes.io/ingress.class: nginx
|
|
|
-spec:
|
|
|
- rules:
|
|
|
- - host: qa-offline-process-charge.ieasou.cn
|
|
|
- http:
|
|
|
- paths:
|
|
|
- - path: /
|
|
|
- backend:
|
|
|
- serviceName: offline-process-charge-svc
|
|
|
- servicePort: 80
|
|
|
----
|
|
|
-apiVersion: v1
|
|
|
-kind: ConfigMap
|
|
|
-metadata:
|
|
|
- name: filebeat-config-offline-process-charge
|
|
|
- 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-charge
|
|
|
- fields_under_root: true
|
|
|
- paths:
|
|
|
- - "/data/logs/app/*.log"
|
|
|
- - "/data/logs/*.log"
|
|
|
- setup.template.enabled: true
|
|
|
- setup.template.name: offline-process-charge
|
|
|
- setup.template.pattern: offline-process-charge*
|
|
|
- setup.dashboards.enabled: true
|
|
|
- output.kafka:
|
|
|
- version: 0.10.2.1
|
|
|
- enable: true
|
|
|
- # initial brokers for reading cluster metadata
|
|
|
- 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"]
|
|
|
- # message topic selection + partitioning
|
|
|
- # topic: '%{[fields.log_topic]}'
|
|
|
- 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'
|
|
|
-# host: 'kibana-svc:80'
|