forked from clemenko/k8s_yaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
graylog.yaml
237 lines (237 loc) · 4.94 KB
/
graylog.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
---
apiVersion: v1
kind: Namespace
metadata:
name: graylog
labels:
istio-injection: disabled
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: elasticsearch
namespace: graylog
labels:
app: elasticsearch
spec:
replicas: 1
selector:
matchLabels:
app: elasticsearch
template:
metadata:
labels:
app: elasticsearch
spec:
initContainers:
- name: init-sysctl
image: busybox:1.30
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
containers:
- image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0
name: elasticsearch
ports:
- containerPort: 9200
name: http
protocol: TCP
- containerPort: 9300
name: transport
protocol: TCP
env:
- name: discovery.type
value: single-node
- name: bootstrap.memory_lock
value: "false"
- name: ES_JAVA_OPTS
value: -Xms512m -Xmx512m
- name: http.host
value: 0.0.0.0
- name: network.host
value: 0.0.0.0
- name: transport.host
value: localhost
resources:
limits:
cpu: 250m
memory: 1Gi
requests:
cpu: 150m
memory: 512Mi
---
kind: Service
apiVersion: v1
metadata:
name: elasticsearch
namespace: graylog
labels:
app: elasticsearch
spec:
selector:
app: elasticsearch
clusterIP: None
ports:
- port: 9200
name: rest
- port: 9300
name: inter-node
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: graylog
namespace: graylog
labels:
app: graylog
spec:
replicas: 1
selector:
matchLabels:
app: graylog
template:
metadata:
labels:
app: graylog
spec:
containers:
- env:
- name: GRAYLOG_HTTP_EXTERNAL_URI
value: http://graylog.rfed.io/
- name: GRAYLOG_PASSWORD_SECRET
value: g0ABP9MJnWCjWtBX9JHFgjKAmD3wGXP3E0JQNOKlquDHnCn5689QAF8rRL66HacXLPA6fvwMY8BZoVVw0JqHnSAZorDDOdCk
- name: GRAYLOG_ROOT_PASSWORD_SHA2
value: ff1fabb33af42c3c19f20a00bbf206edd28ba1da95ca666e8101e7517c85057c
- name: GRAYLOG_ELASTICSEARCH_HOSTS
value: http://elasticsearch:9200
- name: GRAYLOG_MONGODB_URI
value: mongodb://mongo:27017/graylog
- name: GRAYLOG_SERVER_JAVA_OPTS
value: -Xms1g -Xmx1g -XX:NewRatio=1 -XX:MaxMetaspaceSize=256m -server -XX:+ResizeTLAB
-XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled
-XX:+UseParNewGC -XX:-OmitStackTraceInFastThrow
- name: GRAYLOG_HTTP_BIND_ADDRESS
value: 0.0.0.0:9000
image: graylog/graylog:4.1
name: graylog
resources: {}
ports:
- containerPort: 9000
name: http
protocol: TCP
- containerPort: 12201
name: gelf-udp
protocol: UDP
- containerPort: 12201
name: gelf-tcp
protocol: TCP
- containerPort: 514
name: syslog-tcp
protocol: TCP
- containerPort: 514
name: syslog-udp
protocol: UDP
restartPolicy: Always
status: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
app: graylog
name: graylog
namespace: graylog
spec:
type: NodePort
ports:
- name: "9000"
port: 9000
targetPort: 9000
- name: "514"
port: 514
targetPort: 514
- name: 514-udp
port: 514
protocol: UDP
targetPort: 514
- name: 12201-udp
port: 12201
protocol: UDP
targetPort: 12201
- name: "5555"
port: 5555
targetPort: 5555
selector:
app: graylog
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongo
namespace: graylog
labels:
app: mongo
spec:
replicas: 1
selector:
matchLabels:
app: mongo
template:
metadata:
labels:
app: mongo
spec:
containers:
- image: mongo
name: mongo
volumeMounts:
- name: mongo-persistent-storage
mountPath: /data/db
ports:
- containerPort: 27017
volumes:
- name: mongo-persistent-storage
persistentVolumeClaim:
claimName: mongo-persistent-claim
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mongo-persistent-claim
namespace: graylog
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: mongo
name: mongo
namespace: graylog
spec:
ports:
- name: "27017"
port: 27017
targetPort: 27017
selector:
app: mongo
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: graylog-ingressroute
namespace: graylog
spec:
entryPoints:
- web
routes:
- match: Host(`graylog.rfed.io`)
kind: Rule
services:
- name: graylog
port: 9000