-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathgohangout-dnsmasq-k8s.yml
87 lines (85 loc) · 2.44 KB
/
gohangout-dnsmasq-k8s.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
kind: ConfigMap
apiVersion: v1
metadata:
name: gohangout-config
namespace: ns-elastic
data:
gohangout-config-dnsmasq-k8s: |
inputs:
#- Stdin:
# codec: json
- Kafka:
topic:
dnsmasq: 1
#assign:
# healer.test: [0]
codec: json
consumer_settings:
bootstrap.servers: "192.168.38.93:9092"
group.id: gohangout-dnsmasq-qa-k8s-topic
max.partition.fetch.bytes: 10485760
auto.commit.interval.ms: 5000
from.beginning: false
filters:
- Grok:
src: message
match:
- '^(?P<logtime>\S+ \S+ \S+) (?P<pname>\w+)\[(?P<pid>\d+)\]: (?P<action>\S+) (?P<rawdata>.*)$'
- '^(?P<logtime>\S+ \S+ \S+) (?P<pname>\w+)\[(?P<pid>\d+)\]: (?P<action>\S+) (?P<rawdata>.*)$'
remove_fields: ['message']
- Date:
src: 'logtime'
location: Asia/Shanghai
add_year: true
formats:
- '2006Jan 2 15:04:05'
remove_fields: ["logtime"]
outputs:
#- Stdout: {}
- Elasticsearch:
hosts:
- http://192.168.36.145:29200
index: 'gohangout-kafka-dnsmasq-%{+2006-01-02}'
index_type: "logs"
bulk_actions: 5000
bulk_size: 20
flush_interval: 30
concurrent: 1
compress: false
retry_response_code: [401, 502]
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: gohangout-k8s-dnsmasq
namespace: ns-elastic
labels:
app: gohangout-k8s-dnsmasq
spec:
replicas: 1
selector:
matchLabels:
app: gohangout-k8s-dnsmasq
template:
metadata:
labels:
app: gohangout-k8s-dnsmasq
spec:
containers:
- name: gohangout-k8s-dnsmasq
image: dockerhub-pr.yeshj.com/ops/gohangout:1.2.7-3
command: ["/bin/sh","-c"]
args: ["/opt/gohangout/gohangout --config /usr/share/gohangout/indexer-kafka-dnsmasq-k8s.yml -logtostderr -v 5 --worker 3"]
volumeMounts:
- name: vm-config
mountPath: /usr/share/gohangout
imagePullSecrets:
- name: regcred-elastic
volumes:
- name: vm-config
configMap:
name: gohangout-config
items:
- key: gohangout-config-dnsmasq-k8s
path: indexer-kafka-dnsmasq-k8s.yml