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