yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disableLogLogstash }} |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 2 | apiVersion: extensions/v1beta1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | labels: |
| 6 | app: logstash |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 7 | name: log-logstash |
| 8 | namespace: {{ .Values.nsPrefix }} |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 9 | spec: |
| 10 | selector: |
| 11 | matchLabels: |
| 12 | app: logstash |
| 13 | template: |
| 14 | metadata: |
| 15 | labels: |
| 16 | app: logstash |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 17 | name: log-logstash |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 18 | spec: |
kiranya | 7a31821 | 2017-11-22 13:40:04 +0000 | [diff] [blame] | 19 | initContainers: |
| 20 | - command: |
| 21 | - /root/ready.py |
| 22 | args: |
| 23 | - --container-name |
| 24 | - elasticsearch |
| 25 | env: |
| 26 | - name: NAMESPACE |
| 27 | valueFrom: |
| 28 | fieldRef: |
| 29 | apiVersion: v1 |
| 30 | fieldPath: metadata.namespace |
| 31 | image: {{ .Values.image.readiness }} |
| 32 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 33 | name: logstash-readiness |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 34 | containers: |
| 35 | - name: logstash |
| 36 | image: {{ .Values.image.logstash }} |
| 37 | ports: |
mayankg2703 | 229e537 | 2018-01-29 09:33:56 +0000 | [diff] [blame] | 38 | - containerPort: 5044 |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 39 | name: transport |
| 40 | protocol: TCP |
mayankg2703 | 229e537 | 2018-01-29 09:33:56 +0000 | [diff] [blame] | 41 | - containerPort: 9600 |
| 42 | name: http |
| 43 | protocol: TCP |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 44 | readinessProbe: |
| 45 | tcpSocket: |
| 46 | port: 5044 |
| 47 | volumeMounts: |
| 48 | - mountPath: /usr/share/logstash/config/ |
| 49 | name: logstash-conf |
| 50 | - mountPath: /usr/share/logstash/pipeline/ |
| 51 | name: logstash-pipeline |
| 52 | volumes: |
| 53 | - name: logstash-conf |
| 54 | configMap: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 55 | name: log-logstash-configmap |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 56 | items: |
| 57 | - key: logstash.yml |
| 58 | path: logstash.yml |
| 59 | - name: logstash-pipeline |
| 60 | configMap: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 61 | name: log-logstash-configmap |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 62 | items: |
| 63 | - key: onap-pipeline.conf |
| 64 | path: onap-pipeline.conf |
| 65 | |
| 66 | --- |
| 67 | apiVersion: v1 |
| 68 | kind: ConfigMap |
| 69 | metadata: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 70 | name: log-logstash-configmap |
| 71 | namespace: {{ .Values.nsPrefix }} |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 72 | data: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 73 | {{ tpl (.Files.Glob "resources/logstash/conf/logstash.yml").AsConfig . | indent 2 }} |
| 74 | {{ tpl (.Files.Glob "resources/logstash/pipeline/onap-pipeline.conf").AsConfig . | indent 2 }} |
Kerenj | 353ce1d | 2017-11-12 11:08:28 +0200 | [diff] [blame] | 75 | #{{ end }} |