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