vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 15 | #{{ if not .Values.disableLogLogstash }} |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | labels: |
| 20 | app: logstash |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 21 | name: log-logstash |
| 22 | namespace: {{ .Values.nsPrefix }} |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 23 | spec: |
vaibhav_16dec | b7d08b2 | 2018-02-16 06:33:55 +0000 | [diff] [blame] | 24 | replicas: {{ .Values.logstashReplicas }} |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 25 | selector: |
| 26 | matchLabels: |
| 27 | app: logstash |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: logstash |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 32 | name: log-logstash |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 33 | spec: |
kiranya | 7a31821 | 2017-11-22 13:40:04 +0000 | [diff] [blame] | 34 | initContainers: |
| 35 | - command: |
| 36 | - /root/ready.py |
| 37 | args: |
| 38 | - --container-name |
| 39 | - elasticsearch |
| 40 | env: |
| 41 | - name: NAMESPACE |
| 42 | valueFrom: |
| 43 | fieldRef: |
| 44 | apiVersion: v1 |
| 45 | fieldPath: metadata.namespace |
| 46 | image: {{ .Values.image.readiness }} |
| 47 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 48 | name: logstash-readiness |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 49 | containers: |
| 50 | - name: logstash |
| 51 | image: {{ .Values.image.logstash }} |
| 52 | ports: |
mayankg2703 | 229e537 | 2018-01-29 09:33:56 +0000 | [diff] [blame] | 53 | - containerPort: 5044 |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 54 | name: transport |
| 55 | protocol: TCP |
mayankg2703 | 229e537 | 2018-01-29 09:33:56 +0000 | [diff] [blame] | 56 | - containerPort: 9600 |
| 57 | name: http |
| 58 | protocol: TCP |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 59 | readinessProbe: |
| 60 | tcpSocket: |
| 61 | port: 5044 |
| 62 | volumeMounts: |
| 63 | - mountPath: /usr/share/logstash/config/ |
| 64 | name: logstash-conf |
| 65 | - mountPath: /usr/share/logstash/pipeline/ |
| 66 | name: logstash-pipeline |
| 67 | volumes: |
| 68 | - name: logstash-conf |
| 69 | configMap: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 70 | name: log-logstash-configmap |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 71 | items: |
| 72 | - key: logstash.yml |
| 73 | path: logstash.yml |
| 74 | - name: logstash-pipeline |
| 75 | configMap: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 76 | name: log-logstash-configmap |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 77 | items: |
| 78 | - key: onap-pipeline.conf |
| 79 | path: onap-pipeline.conf |
| 80 | |
| 81 | --- |
| 82 | apiVersion: v1 |
| 83 | kind: ConfigMap |
| 84 | metadata: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 85 | name: log-logstash-configmap |
| 86 | namespace: {{ .Values.nsPrefix }} |
Itay Hassid | e2da86d | 2017-08-24 12:54:42 +0000 | [diff] [blame] | 87 | data: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 88 | {{ tpl (.Files.Glob "resources/logstash/conf/logstash.yml").AsConfig . | indent 2 }} |
| 89 | {{ tpl (.Files.Glob "resources/logstash/pipeline/onap-pipeline.conf").AsConfig . | indent 2 }} |
Kerenj | 353ce1d | 2017-11-12 11:08:28 +0200 | [diff] [blame] | 90 | #{{ end }} |