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 |
| 7 | name: logstash |
| 8 | namespace: {{ .Values.nsPrefix }}-log |
| 9 | spec: |
| 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 | --- |
| 76 | apiVersion: v1 |
| 77 | kind: ConfigMap |
| 78 | metadata: |
| 79 | name: logstash-configmap |
| 80 | namespace: {{ .Values.nsPrefix }}-log |
| 81 | data: |
| 82 | {{ (.Files.Glob "resources/logstash/conf/logstash.yml").AsConfig | indent 2 }} |
Kerenj | 353ce1d | 2017-11-12 11:08:28 +0200 | [diff] [blame] | 83 | {{ tpl (.Files.Glob "resources/logstash/pipeline/onap-pipeline.conf").AsConfig . | indent 2 }} |
| 84 | #{{ end }} |