blob: f35c421e68a19c4799ad3e3b96ace0c7fa044cf9 [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disableLogLogstash }}
Itay Hasside2da86d2017-08-24 12:54:42 +00002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
5 labels:
6 app: logstash
7 name: logstash
8 namespace: {{ .Values.nsPrefix }}-log
9spec:
10 selector:
11 matchLabels:
12 app: logstash
13 template:
14 metadata:
15 labels:
16 app: logstash
17 name: logstash
18 annotations:
19 pod.beta.kubernetes.io/init-containers: '[
20 {
21 "args": [
22 "--container-name",
23 "elasticsearch"
24 ],
25 "command": [
26 "/root/ready.py"
27 ],
28 "env": [
29 {
30 "name": "NAMESPACE",
31 "valueFrom": {
32 "fieldRef": {
33 "apiVersion": "v1",
34 "fieldPath": "metadata.namespace"
35 }
36 }
37 }
38 ],
39 "image": "{{ .Values.image.readiness }}",
40 "imagePullPolicy": "{{ .Values.pullPolicy }}",
41 "name": "logstash-readiness"
42 }
43 ]'
44
45 spec:
46 containers:
47 - name: logstash
48 image: {{ .Values.image.logstash }}
49 ports:
50 - containerPort: 5044
51 name: transport
52 protocol: TCP
53 readinessProbe:
54 tcpSocket:
55 port: 5044
56 volumeMounts:
57 - mountPath: /usr/share/logstash/config/
58 name: logstash-conf
59 - mountPath: /usr/share/logstash/pipeline/
60 name: logstash-pipeline
61 volumes:
62 - name: logstash-conf
63 configMap:
64 name: logstash-configmap
65 items:
66 - key: logstash.yml
67 path: logstash.yml
68 - name: logstash-pipeline
69 configMap:
70 name: logstash-configmap
71 items:
72 - key: onap-pipeline.conf
73 path: onap-pipeline.conf
74
75---
76apiVersion: v1
77kind: ConfigMap
78metadata:
79 name: logstash-configmap
80 namespace: {{ .Values.nsPrefix }}-log
81data:
82{{ (.Files.Glob "resources/logstash/conf/logstash.yml").AsConfig | indent 2 }}
Kerenj353ce1d2017-11-12 11:08:28 +020083{{ tpl (.Files.Glob "resources/logstash/pipeline/onap-pipeline.conf").AsConfig . | indent 2 }}
84#{{ end }}