blob: f362f1c901fd80765b37687072ef92807e15bfd3 [file] [log] [blame]
dglFromAttfb58a9d2019-04-12 20:12:26 +00001
Durgpal7ad40692018-08-03 07:28:36 +00002# Modifications Copyright © 2018 Amdocs,Bell Canada
Dominic Lunanuovae825fee2018-04-12 14:40:34 +00003#
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
16apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
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 }}
26spec:
27 replicas: {{ .Values.replicaCount }}
28 template:
29 metadata:
30 labels:
31 app: {{ include "common.name" . }}
32 release: {{ .Release.Name }}
33 spec:
34 initContainers:
efiacore62958b2019-09-27 16:54:36 +010035{{- if .Values.global.aafEnabled }}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000036 - command:
37 - /root/ready.py
38 args:
39 - --container-name
dglFromAttfb58a9d2019-04-12 20:12:26 +000040 - aaf-locate
41 env:
42 - name: NAMESPACE
43 valueFrom:
44 fieldRef:
45 apiVersion: v1
46 fieldPath: metadata.namespace
47 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
48 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
49 name: {{ include "common.name" . }}-aaf-readiness
efiacore62958b2019-09-27 16:54:36 +010050{{- end }}
51{{- if .Values.PG.enabled }}
dglFromAttfb58a9d2019-04-12 20:12:26 +000052 - command:
53 - /root/ready.py
54 args:
55 - --container-name
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000056 - {{ .Values.postgres.nameOverride }}
57 env:
58 - name: NAMESPACE
59 valueFrom:
60 fieldRef:
61 apiVersion: v1
62 fieldPath: metadata.namespace
63 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
64 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
dglFromAttfb58a9d2019-04-12 20:12:26 +000065 name: {{ include "common.name" . }}-postgres-readiness
66{{- end}}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000067 containers:
68 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000069 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000070 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
71 ports:
72 - containerPort: {{ .Values.service.internalPort }}
73 - containerPort: {{ .Values.service.internalPort2 }}
efiacore62958b2019-09-27 16:54:36 +010074 {{ if eq .Values.liveness.enabled true -}}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000075 livenessProbe:
76 httpGet:
77 port: {{ .Values.service.internalPort }}
78 path: /webapi/info
79 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
dglFromAttec0918d2018-10-17 19:34:49 +000080 periodSeconds: {{ .Values.liveness.periodSeconds }}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000081 readinessProbe:
82 httpGet:
dglFromAttd9d3f422018-10-18 21:04:35 +000083 host: {{ .Values.dmaapMessageRouterService }}
84 port: 3904
85 path: /topics
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000086 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
87 periodSeconds: {{ .Values.readiness.periodSeconds }}
88 {{ end -}}
89 volumeMounts:
90 - mountPath: /etc/localtime
91 name: localtime
92 readOnly: true
dglFromAttec0918d2018-10-17 19:34:49 +000093# NOTE: on the following several configMaps, careful to include / at end
94# since there may be more than one file in each mountPath
Dominic Lunanuovae825fee2018-04-12 14:40:34 +000095 - name: {{ include "common.name" . }}-config
dglFromAtt82340072018-10-16 21:53:34 +000096 mountPath: /opt/app/config/conf/
pkaras837db952019-04-23 13:45:25 +020097 - name: {{ include "common.name" . }}-aaf-config
98 mountPath: /opt/app/dmaapbc/etc/org.onap.dmaap-bc.props
99 subPath: org.onap.dmaap-bc.props
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000100 resources:
efiacore62958b2019-09-27 16:54:36 +0100101{{ include "common.resources" . }}
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000102 {{- if .Values.nodeSelector }}
103 nodeSelector:
104{{ toYaml .Values.nodeSelector | indent 10 }}
105 {{- end -}}
106 {{- if .Values.affinity }}
107 affinity:
108{{ toYaml .Values.affinity | indent 10 }}
109 {{- end }}
110 volumes:
111 - name: localtime
112 hostPath:
113 path: /etc/localtime
114 - name: {{ include "common.name" . }}-config
115 configMap:
116 name: {{ include "common.fullname" . }}-config
pkaras837db952019-04-23 13:45:25 +0200117 - name: {{ include "common.name" . }}-aaf-config
118 configMap:
119 name: {{ include "common.fullname" . }}-aaf-config
Dominic Lunanuovae825fee2018-04-12 14:40:34 +0000120 imagePullSecrets:
121 - name: "{{ include "common.namespace" . }}-docker-registry-key"