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.disableSdcSdcBe }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | labels: |
| 20 | app: sdc-be |
| 21 | name: sdc-be |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 22 | namespace: "{{ .Values.nsPrefix }}" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 23 | spec: |
| 24 | selector: |
| 25 | matchLabels: |
| 26 | app: sdc-be |
| 27 | template: |
| 28 | metadata: |
| 29 | labels: |
| 30 | app: sdc-be |
| 31 | name: sdc-be |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 32 | spec: |
vasundhra | 98960b6 | 2017-11-22 12:43:29 +0000 | [diff] [blame] | 33 | initContainers: |
| 34 | - command: |
| 35 | - /root/ready.py |
| 36 | args: |
| 37 | - --container-name |
| 38 | - sdc-es |
| 39 | - --container-name |
| 40 | - sdc-cs |
| 41 | - --container-name |
| 42 | - sdc-kb |
| 43 | env: |
| 44 | - name: NAMESPACE |
| 45 | valueFrom: |
| 46 | fieldRef: |
| 47 | apiVersion: v1 |
| 48 | fieldPath: metadata.namespace |
| 49 | image: {{ .Values.image.readiness }} |
| 50 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 51 | name: sdc-be-readiness |
| 52 | - command: |
| 53 | - /root/ready.py |
| 54 | args: |
| 55 | - --container-name |
| 56 | - dmaap |
| 57 | env: |
| 58 | - name: NAMESPACE |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 59 | value: {{ .Values.nsPrefix }} |
vasundhra | 98960b6 | 2017-11-22 12:43:29 +0000 | [diff] [blame] | 60 | image: {{ .Values.image.readiness }} |
| 61 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 62 | name: sdc-dmaap-readiness |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 63 | containers: |
| 64 | - env: |
| 65 | - name: ENVNAME |
| 66 | value: AUTO |
| 67 | - name: HOST_IP |
| 68 | valueFrom: |
| 69 | fieldRef: |
| 70 | fieldPath: status.podIP |
kerenj | 8010284 | 2017-08-24 13:54:21 +0000 | [diff] [blame] | 71 | image: {{ .Values.image.sdcBackend }} |
| 72 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 73 | name: sdc-be |
| 74 | volumeMounts: |
| 75 | - mountPath: /usr/share/elasticsearch/data/ |
| 76 | name: sdc-sdc-es-es |
| 77 | - mountPath: /root/chef-solo/environments/ |
| 78 | name: sdc-environments |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 79 | - mountPath: /etc/localtime |
| 80 | name: sdc-localtime |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 81 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 82 | - mountPath: /var/lib/jetty/logs |
| 83 | name: sdc-logs |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 84 | - mountPath: /var/log/onap |
| 85 | name: sdc-logs-2 |
Mandeep Khinda | 11982f7 | 2017-10-13 17:54:20 +0000 | [diff] [blame] | 86 | - mountPath: /tmp/logback.xml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 87 | name: sdc-logback |
Mandeep Khinda | 11982f7 | 2017-10-13 17:54:20 +0000 | [diff] [blame] | 88 | lifecycle: |
| 89 | postStart: |
| 90 | exec: |
| 91 | command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"] |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 92 | ports: |
| 93 | - containerPort: 8443 |
| 94 | - containerPort: 8080 |
| 95 | readinessProbe: |
| 96 | tcpSocket: |
| 97 | port: 8443 |
| 98 | initialDelaySeconds: 5 |
| 99 | periodSeconds: 10 |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 100 | - image: {{ .Values.image.filebeat }} |
| 101 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 102 | name: filebeat-onap |
| 103 | volumeMounts: |
| 104 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 105 | name: filebeat-conf |
Pramod | ba635b3 | 2018-01-17 12:05:14 +0000 | [diff] [blame] | 106 | subPath: filebeat.yml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 107 | - mountPath: /var/log/onap |
| 108 | name: sdc-logs-2 |
| 109 | - mountPath: /usr/share/filebeat/data |
| 110 | name: sdc-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 111 | volumes: |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 112 | - name: filebeat-conf |
Pramod | ba635b3 | 2018-01-17 12:05:14 +0000 | [diff] [blame] | 113 | configMap: |
| 114 | name: sdc-filebeat-configmap |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 115 | - name: sdc-logs-2 |
| 116 | emptyDir: {} |
| 117 | - name: sdc-data-filebeat |
| 118 | emptyDir: {} |
| 119 | - name: sdc-logback |
Pramod | ba635b3 | 2018-01-17 12:05:14 +0000 | [diff] [blame] | 120 | configMap: |
| 121 | name : sdc-log-be-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 122 | - name: sdc-sdc-es-es |
| 123 | hostPath: |
kerenj | 390aec9 | 2018-02-25 13:57:36 +0000 | [diff] [blame] | 124 | path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 125 | - name: sdc-environments |
Pramod | ba635b3 | 2018-01-17 12:05:14 +0000 | [diff] [blame] | 126 | configMap: |
| 127 | name: sdc-environments-configmap |
| 128 | defaultMode: 0755 |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 129 | - name: sdc-localtime |
| 130 | hostPath: |
| 131 | path: /etc/localtime |
| 132 | - name: sdc-logs |
| 133 | hostPath: |
kerenj | 390aec9 | 2018-02-25 13:57:36 +0000 | [diff] [blame] | 134 | path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 135 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 136 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 98960b6 | 2017-11-22 12:43:29 +0000 | [diff] [blame] | 137 | #{{ end }} |