mark.j.leonard | 827c851 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 1 | # Copyright © 2018 Amdocs, AT&T |
toshrajbhardwaj | 84d73b1 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 Bell Canada |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: {{ include "common.fullname" . }} |
| 20 | namespace: {{ include "common.namespace" . }} |
| 21 | labels: |
| 22 | app: {{ include "common.name" . }} |
| 23 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 24 | release: {{ .Release.Name }} |
| 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
| 27 | replicas: {{ .Values.replicaCount }} |
| 28 | selector: |
| 29 | matchLabels: |
| 30 | app: {{ include "common.name" . }} |
| 31 | template: |
| 32 | metadata: |
| 33 | labels: |
| 34 | app: {{ include "common.name" . }} |
| 35 | release: {{ .Release.Name }} |
| 36 | name: {{ include "common.name" . }} |
| 37 | spec: |
kranthikirang | 0307856 | 2018-12-07 16:12:02 -0500 | [diff] [blame^] | 38 | {{- if .Values.nodeSelector }} |
| 39 | nodeSelector: |
| 40 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 41 | {{- end -}} |
| 42 | {{- if .Values.affinity }} |
| 43 | affinity: |
| 44 | {{ toYaml .Values.affinity | indent 8 }} |
| 45 | {{- end }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 46 | containers: |
| 47 | - name: {{ include "common.name" . }} |
BorislavG | 809b1d7 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 48 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 49 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 50 | env: |
| 51 | - name: CONFIG_HOME |
| 52 | value: /opt/app/model-loader/config/ |
| 53 | volumeMounts: |
| 54 | - mountPath: /etc/localtime |
| 55 | name: localtime |
| 56 | readOnly: true |
| 57 | - mountPath: /opt/app/model-loader/config/model-loader.properties |
| 58 | subPath: model-loader.properties |
| 59 | name: {{ include "common.fullname" . }}-prop-config |
| 60 | - mountPath: /opt/app/model-loader/config/auth/ |
| 61 | name: {{ include "common.fullname" . }}-auth-config |
mark.j.leonard | 827c851 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 62 | - mountPath: /var/log/onap |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 63 | name: {{ include "common.fullname" . }}-logs |
Jimmy Forsyth | b95074b | 2018-05-01 16:03:43 -0400 | [diff] [blame] | 64 | - mountPath: /opt/app/model-loader/logback.xml |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 65 | name: {{ include "common.fullname" . }}-log-conf |
| 66 | subPath: logback.xml |
| 67 | ports: |
| 68 | - containerPort: {{ .Values.service.internalPort }} |
| 69 | - containerPort: {{ .Values.service.internalPort2 }} |
rajeshkalai | 47c1de3 | 2018-09-20 06:36:28 -0400 | [diff] [blame] | 70 | resources: |
kranthikirang | 0307856 | 2018-12-07 16:12:02 -0500 | [diff] [blame^] | 71 | {{ include "common.resources" . }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 72 | |
| 73 | # side car containers |
| 74 | - name: filebeat-onap |
| 75 | image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" |
| 76 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 77 | volumeMounts: |
| 78 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 79 | subPath: filebeat.yml |
| 80 | name: filebeat-conf |
mark.j.leonard | 827c851 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 81 | - mountPath: /var/log/onap |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 82 | name: {{ include "common.fullname" . }}-logs |
| 83 | - mountPath: /usr/share/filebeat/data |
| 84 | name: aai-filebeat |
kranthikirang | 0307856 | 2018-12-07 16:12:02 -0500 | [diff] [blame^] | 85 | resources: |
| 86 | {{ include "common.resources" . }} |
kj | 6a8ce80 | 2018-03-19 15:07:44 +0200 | [diff] [blame] | 87 | volumes: |
| 88 | - name: localtime |
| 89 | hostPath: |
| 90 | path: /etc/localtime |
| 91 | - name: {{ include "common.fullname" . }}-prop-config |
| 92 | configMap: |
| 93 | name: {{ include "common.fullname" . }}-prop |
| 94 | - name: {{ include "common.fullname" . }}-auth-config |
| 95 | secret: |
| 96 | secretName: {{ include "common.fullname" . }} |
| 97 | - name: filebeat-conf |
| 98 | configMap: |
| 99 | name: aai-filebeat |
| 100 | - name: {{ include "common.fullname" . }}-logs |
| 101 | emptyDir: {} |
| 102 | - name: aai-filebeat |
| 103 | emptyDir: {} |
| 104 | - name: {{ include "common.fullname" . }}-log-conf |
| 105 | configMap: |
| 106 | name: {{ include "common.fullname" . }}-log |
| 107 | restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} |
| 108 | imagePullSecrets: |
| 109 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |