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