blob: 4987e4a05d6153d12ca4f3fe6077dd71f9d9d200 [file] [log] [blame]
Daniel Silverthorn48f10702018-03-08 10:02:21 -05001# Copyright © 2018 Amdocs, AT&T
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00002# Modifications Copyright © 2018 Bell Canada
Daniel Silverthorn48f10702018-03-08 10:02:21 -05003#
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 containers:
35 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000036 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Daniel Silverthorn48f10702018-03-08 10:02:21 -050037 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
38 ports:
39 - containerPort: {{ .Values.service.internalPort }}
40 # disable liveness probe when breakpoints set in debugger
41 # so K8s doesn't restart unresponsive container
kj05b57f82018-03-28 18:10:32 +030042 {{ if .Values.liveness.enabled }}
Daniel Silverthorn48f10702018-03-08 10:02:21 -050043 livenessProbe:
44 tcpSocket:
45 port: {{ .Values.service.internalPort }}
46 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
47 periodSeconds: {{ .Values.liveness.periodSeconds }}
kj05b57f82018-03-28 18:10:32 +030048 {{ end }}
Daniel Silverthorn48f10702018-03-08 10:02:21 -050049 readinessProbe:
50 tcpSocket:
51 port: {{ .Values.service.internalPort }}
52 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
53 periodSeconds: {{ .Values.readiness.periodSeconds }}
54 env:
55 - name: CONFIG_HOME
56 value: "/opt/app/champ-service/appconfig"
57 - name: GRAPHIMPL
58 value: "janus-deps"
Daniel Silverthorn82cee4d2018-03-28 19:18:19 +000059 - name: KEY_STORE_PASSWORD
60 valueFrom:
61 secretKeyRef:
62 name: {{ template "common.fullname" . }}-pass
63 key: KEY_STORE_PASSWORD
64 - name: KEY_MANAGER_PASSWORD
65 valueFrom:
66 secretKeyRef:
67 name: {{ template "common.fullname" . }}-pass
68 key: KEY_MANAGER_PASSWORD
Daniel Silverthorn48f10702018-03-08 10:02:21 -050069 - name: SERVICE_BEANS
70 value: "/opt/app/champ-service/dynamic/conf"
71 volumeMounts:
72 - mountPath: /etc/localtime
73 name: localtime
74 readOnly: true
75 - mountPath: /opt/app/champ-service/appconfig/champ-api.properties
76 name: {{ include "common.fullname" . }}-config
77 subPath: champ-api.properties
78 - mountPath: /opt/app/champ-service/appconfig/auth
79 name: {{ include "common.fullname" . }}-secrets
80 - mountPath: /opt/app/champ-service/dynamic/conf/champ-beans.xml
81 name: {{ include "common.fullname" . }}-dynamic-config
82 subPath: champ-beans.xml
Shwetank Daveb4333f92018-08-14 09:55:46 -040083 - mountPath: /opt/app/champ-service/bundleconfig/etc/logback.xml
84 name: {{ include "common.fullname" . }}-logback-config
85 subPath: logback.xml
Michael Arrastia1149a062018-09-17 15:12:45 +010086 - mountPath: /var/log/onap
Daniel Silverthorn48f10702018-03-08 10:02:21 -050087 name: {{ include "common.fullname" . }}-logs
88 resources:
rajeshkalai9fcfbce2018-09-20 06:36:28 -040089{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
Daniel Silverthorn48f10702018-03-08 10:02:21 -050090 {{- if .Values.nodeSelector }}
91 nodeSelector:
92{{ toYaml .Values.nodeSelector | indent 10 }}
93 {{- end -}}
94 {{- if .Values.affinity }}
95 affinity:
96{{ toYaml .Values.affinity | indent 10 }}
97 {{- end }}
98
Michael Arrastia1149a062018-09-17 15:12:45 +010099 # side car containers
100 - name: filebeat-onap
101 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
102 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
103 volumeMounts:
104 - mountPath: /usr/share/filebeat/filebeat.yml
105 subPath: filebeat.yml
106 name: filebeat-conf
107 - mountPath: /var/log/onap
108 name: {{ include "common.fullname" . }}-logs
109 - mountPath: /usr/share/filebeat/data
110 name: aai-filebeat
111
Daniel Silverthorn48f10702018-03-08 10:02:21 -0500112 volumes:
113 - name: localtime
114 hostPath:
115 path: /etc/localtime
Daniel Silverthorn48f10702018-03-08 10:02:21 -0500116 - name: {{ include "common.fullname" . }}-config
117 configMap:
Daniel Silverthorn82cee4d2018-03-28 19:18:19 +0000118 name: {{ include "common.fullname" . }}
Daniel Silverthorn48f10702018-03-08 10:02:21 -0500119 items:
120 - key: champ-api.properties
121 path: champ-api.properties
122 - name: {{ include "common.fullname" . }}-secrets
123 secret:
Daniel Silverthorn82cee4d2018-03-28 19:18:19 +0000124 secretName: {{ include "common.fullname" . }}-champ
Daniel Silverthorn48f10702018-03-08 10:02:21 -0500125 - name: {{ include "common.fullname" . }}-dynamic-config
126 configMap:
Daniel Silverthorn82cee4d2018-03-28 19:18:19 +0000127 name: {{ include "common.fullname" . }}-dynamic
Daniel Silverthorn48f10702018-03-08 10:02:21 -0500128 items:
129 - key: champ-beans.xml
130 path: champ-beans.xml
131 - name: {{ include "common.fullname" . }}-logs
132 emptyDir: {}
Shwetank Daveb4333f92018-08-14 09:55:46 -0400133 - name: {{ include "common.fullname" . }}-logback-config
134 configMap:
135 name: {{ include "common.fullname" . }}-log-configmap
136 items:
137 - key: logback.xml
138 path: logback.xml
Michael Arrastia1149a062018-09-17 15:12:45 +0100139 - name: filebeat-conf
140 configMap:
141 name: aai-filebeat
142 - name: aai-filebeat
143 emptyDir: {}
Daniel Silverthorn48f10702018-03-08 10:02:21 -0500144 imagePullSecrets:
145 - name: "{{ include "common.namespace" . }}-docker-registry-key"