BorislavG | 5f3b619 | 2018-03-25 18:12:38 +0300 | [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 | |
| 15 | apiVersion: extensions/v1beta1 |
Michael O'Brien | 286725f | 2018-05-18 01:51:02 -0400 | [diff] [blame] | 16 | kind: DaemonSet |
BorislavG | 5f3b619 | 2018-03-25 18:12:38 +0300 | [diff] [blame] | 17 | metadata: |
| 18 | name: {{ include "common.fullname" . }} |
| 19 | namespace: {{ include "common.namespace" . }} |
| 20 | labels: |
| 21 | app: {{ include "common.name" . }} |
| 22 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 23 | release: {{ .Release.Name }} |
| 24 | heritage: {{ .Release.Service }} |
| 25 | spec: |
BorislavG | 5f3b619 | 2018-03-25 18:12:38 +0300 | [diff] [blame] | 26 | template: |
| 27 | metadata: |
| 28 | labels: |
| 29 | app: {{ include "common.name" . }} |
| 30 | release: {{ .Release.Name }} |
| 31 | spec: |
| 32 | initContainers: |
| 33 | - command: |
| 34 | - /root/ready.py |
| 35 | args: |
| 36 | - --container-name |
| 37 | - log-elasticsearch |
| 38 | env: |
| 39 | - name: NAMESPACE |
| 40 | valueFrom: |
| 41 | fieldRef: |
| 42 | apiVersion: v1 |
| 43 | fieldPath: metadata.namespace |
| 44 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 45 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 46 | name: {{ include "common.name" . }}-readiness |
| 47 | containers: |
| 48 | - name: {{ include "common.name" . }} |
| 49 | image: "{{ .Values.global.loggingRepository| default .Values.loggingRepository }}/{{ .Values.image }}" |
| 50 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 51 | ports: |
| 52 | - containerPort: {{ .Values.service.internalPort }} |
| 53 | name: {{ .Values.service.name }} |
BorislavG | 2cf2684 | 2018-04-08 17:50:07 +0300 | [diff] [blame] | 54 | - containerPort: {{ .Values.service.internalPort2 }} |
| 55 | name: {{ .Values.service.name2 }} |
BorislavG | 5f3b619 | 2018-03-25 18:12:38 +0300 | [diff] [blame] | 56 | readinessProbe: |
| 57 | tcpSocket: |
| 58 | port: {{ .Values.service.internalPort }} |
| 59 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 60 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 61 | # disable liveness probe when breakpoints set in debugger |
| 62 | # so K8s doesn't restart unresponsive container |
| 63 | {{- if eq .Values.liveness.enabled true }} |
| 64 | livenessProbe: |
| 65 | tcpSocket: |
| 66 | port: {{ .Values.service.internalPort }} |
| 67 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 68 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 69 | {{ end -}} |
| 70 | env: |
| 71 | volumeMounts: |
| 72 | - mountPath: /etc/localtime |
| 73 | name: localtime |
| 74 | readOnly: true |
root | 4565d0a | 2018-04-04 17:21:02 +0000 | [diff] [blame] | 75 | - mountPath: /usr/share/logstash/config/ |
| 76 | name: {{ include "common.fullname" . }}-config |
| 77 | - mountPath: /usr/share/logstash/pipeline/ |
| 78 | name: {{ include "common.fullname" . }}-pipeline |
BorislavG | 5f3b619 | 2018-03-25 18:12:38 +0300 | [diff] [blame] | 79 | resources: |
| 80 | {{ toYaml .Values.resources | indent 12 }} |
| 81 | {{- if .Values.nodeSelector }} |
| 82 | nodeSelector: |
| 83 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 84 | {{- end -}} |
| 85 | {{- if .Values.affinity }} |
| 86 | affinity: |
| 87 | {{ toYaml .Values.affinity | indent 10 }} |
| 88 | {{- end }} |
| 89 | volumes: |
| 90 | - name: localtime |
| 91 | hostPath: |
| 92 | path: /etc/localtime |
root | 4565d0a | 2018-04-04 17:21:02 +0000 | [diff] [blame] | 93 | - name: {{ include "common.fullname" . }}-config |
BorislavG | 5f3b619 | 2018-03-25 18:12:38 +0300 | [diff] [blame] | 94 | configMap: |
| 95 | name: {{ include "common.fullname" . }} |
| 96 | items: |
| 97 | - key: logstash.yml |
| 98 | path: logstash.yml |
root | 4565d0a | 2018-04-04 17:21:02 +0000 | [diff] [blame] | 99 | - name: {{ include "common.fullname" . }}-pipeline |
| 100 | configMap: |
| 101 | name: {{ include "common.fullname" . }} |
| 102 | items: |
BorislavG | 5f3b619 | 2018-03-25 18:12:38 +0300 | [diff] [blame] | 103 | - key: onap-pipeline.conf |
| 104 | path: onap-pipeline.conf |
| 105 | imagePullSecrets: |
| 106 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |