blob: a434439b14296a0faeebafee876363ad81beb4d8 [file] [log] [blame]
Durgpal7ad40692018-08-03 07:28:36 +00001# Modifications Copyright © 2018 Amdocs,Bell Canada
Dominic Lunanuovae825fee2018-04-12 14:40:34 +00002#
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
15apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010023 release: {{ include "common.release" . }}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000024 heritage: {{ .Release.Service }}
25spec:
26 replicas: {{ .Values.replicaCount }}
27 template:
28 metadata:
29 labels:
30 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010031 release: {{ include "common.release" . }}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000032 spec:
33 initContainers:
efiacore62958b2019-09-27 16:54:36 +010034{{- if .Values.global.aafEnabled }}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000035 - command:
36 - /root/ready.py
37 args:
38 - --container-name
dglFromAttfb58a9d2019-04-12 20:12:26 +000039 - aaf-locate
40 env:
41 - name: NAMESPACE
42 valueFrom:
43 fieldRef:
44 apiVersion: v1
45 fieldPath: metadata.namespace
46 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
47 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
48 name: {{ include "common.name" . }}-aaf-readiness
Ubuntu3d5d1802019-11-14 23:16:17 +000049 - name: {{ include "common.name" . }}-dbc-aaf-config
50 image: "{{ include "common.repository" . }}/{{ .Values.global.aafAgentImage }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 command: ["bash","-c","exec /opt/app/aaf_config/bin/agent.sh"]
53 volumeMounts:
54 - mountPath: {{ .Values.persistence.aafCredsPath }}
55 name: {{ include "common.name" . }}-aaf-config
56 env:
57 - name: APP_FQI
58 value: "{{ .Values.aafConfig.fqi }}"
59 - name: aaf_locate_url
60 value: "https://aaf-locate.{{ .Release.Namespace }}:8095"
61 - name: aaf_locator_container
62 value: "{{ .Values.global.aafLocatorContainer }}"
63 - name: aaf_locator_container_ns
64 value: "{{ .Release.Namespace }}"
65 - name: aaf_locator_fqdn
66 value: "{{ .Values.aafConfig.fqdn }}"
67 - name: aaf_locator_public_fqdn
68 value: "{{.Values.aafConfig.publicFqdn}}"
69 - name: aaf_locator_app_ns
70 value: "{{ .Values.global.aafAppNs }}"
71 - name: DEPLOY_FQI
72 value: "{{ .Values.aafConfig.aafDeployFqi }}"
73 - name: DEPLOY_PASSWORD
74 valueFrom:
75 secretKeyRef:
76 name: {{ include "common.fullname" . }}-secret
77 key: aaf-deploy-password
78 - name: cadi_longitude
79 value: "{{ .Values.aafConfig.cadiLongitude }}"
80 - name: cadi_latitude
81 value: "{{ .Values.aafConfig.cadiLatitude }}"
efiacore62958b2019-09-27 16:54:36 +010082{{- end }}
83{{- if .Values.PG.enabled }}
dglFromAttfb58a9d2019-04-12 20:12:26 +000084 - command:
85 - /root/ready.py
86 args:
87 - --container-name
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000088 - {{ .Values.postgres.nameOverride }}
89 env:
90 - name: NAMESPACE
91 valueFrom:
92 fieldRef:
93 apiVersion: v1
94 fieldPath: metadata.namespace
95 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
96 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
dglFromAttfb58a9d2019-04-12 20:12:26 +000097 name: {{ include "common.name" . }}-postgres-readiness
98{{- end}}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000099 containers:
100 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +0000101 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000102 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
103 ports:
104 - containerPort: {{ .Values.service.internalPort }}
105 - containerPort: {{ .Values.service.internalPort2 }}
efiacore62958b2019-09-27 16:54:36 +0100106 {{ if eq .Values.liveness.enabled true -}}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000107 livenessProbe:
108 httpGet:
109 port: {{ .Values.service.internalPort }}
110 path: /webapi/info
111 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
dglFromAttec0918d2018-10-17 19:34:49 +0000112 periodSeconds: {{ .Values.liveness.periodSeconds }}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000113 readinessProbe:
114 httpGet:
dglFromAttd9d3f422018-10-18 21:04:35 +0000115 host: {{ .Values.dmaapMessageRouterService }}
116 port: 3904
117 path: /topics
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000118 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
119 periodSeconds: {{ .Values.readiness.periodSeconds }}
120 {{ end -}}
121 volumeMounts:
122 - mountPath: /etc/localtime
123 name: localtime
124 readOnly: true
dglFromAttec0918d2018-10-17 19:34:49 +0000125# NOTE: on the following several configMaps, careful to include / at end
126# since there may be more than one file in each mountPath
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000127 - name: {{ include "common.name" . }}-config
dglFromAtt82340072018-10-16 21:53:34 +0000128 mountPath: /opt/app/config/conf/
pkaras837db952019-04-23 13:45:25 +0200129 - name: {{ include "common.name" . }}-aaf-config
130 mountPath: /opt/app/dmaapbc/etc/org.onap.dmaap-bc.props
131 subPath: org.onap.dmaap-bc.props
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000132 resources:
efiacore62958b2019-09-27 16:54:36 +0100133{{ include "common.resources" . }}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000134 {{- if .Values.nodeSelector }}
135 nodeSelector:
136{{ toYaml .Values.nodeSelector | indent 10 }}
137 {{- end -}}
138 {{- if .Values.affinity }}
139 affinity:
140{{ toYaml .Values.affinity | indent 10 }}
141 {{- end }}
142 volumes:
143 - name: localtime
144 hostPath:
145 path: /etc/localtime
146 - name: {{ include "common.name" . }}-config
147 configMap:
148 name: {{ include "common.fullname" . }}-config
pkaras837db952019-04-23 13:45:25 +0200149 - name: {{ include "common.name" . }}-aaf-config
150 configMap:
151 name: {{ include "common.fullname" . }}-aaf-config
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000152 imagePullSecrets:
153 - name: "{{ include "common.namespace" . }}-docker-registry-key"