blob: d36ae2f874ee3554e8016053e7af6fbca24ec2dd [file] [log] [blame]
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -04001# Copyright © 2018 Amdocs, AT&T
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00002# Modifications Copyright © 2018 Bell Canada
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -04003#
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: {{ .Chart.Name }}
BorislavGdf11cd52018-05-06 12:55:20 +000036 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040037 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 }}
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040043 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 }}
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040049 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/crud-service/config/
57 - name: KEY_STORE_PASSWORD
58 valueFrom:
59 secretKeyRef:
60 name: {{ template "common.fullname" . }}-pass
61 key: KEY_STORE_PASSWORD
62 - name: KEY_MANAGER_PASSWORD
63 valueFrom:
64 secretKeyRef:
65 name: {{ template "common.fullname" . }}-pass
66 key: KEY_MANAGER_PASSWORD
67 - name: SERVICE_BEANS
68 value: /opt/app/crud-service/dynamic/conf
69 volumeMounts:
70 - mountPath: /etc/localtime
71 name: localtime
72 readOnly: true
73 - mountPath: /opt/app/crud-service/config/crud-api.properties
74 subPath: crud-api.properties
75 name: {{ include "common.fullname" . }}-config
Michael Arrastiaf529a462018-06-13 17:01:15 +010076 - mountPath: /opt/app/crud-service/config/schemaIngest.properties
77 subPath: schemaIngest.properties
78 name: {{ include "common.fullname" . }}-config
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040079 - mountPath: /opt/app/crud-service/config/model/
80 name: {{ include "common.fullname" . }}-model-config
81 - mountPath: /opt/app/crud-service/config/auth
82 name: {{ include "common.fullname" . }}-auth-secret
83 - mountPath: /opt/app/crud-service/dynamic/conf/crud-beans.xml
84 name: {{ include "common.fullname" . }}-config
85 subPath: crud-beans.xml
86 - mountPath: /var/log/onap
87 name: {{ include "common.fullname" . }}-logs
88 - mountPath: /opt/app/crud-api/bundleconfig/etc/logback.xml
89 name: {{ include "common.fullname" . }}-logback-config
90 subPath: logback.xml
91 resources:
rajeshkalai9fcfbce2018-09-20 06:36:28 -040092{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -040093 {{- if .Values.nodeSelector }}
94 nodeSelector:
95{{ toYaml .Values.nodeSelector | indent 10 }}
96 {{- end -}}
97 {{- if .Values.affinity }}
98 affinity:
99{{ toYaml .Values.affinity | indent 10 }}
100 {{- end }}
101
102 - name: filebeat-onap
103 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
104 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
105 volumeMounts:
106 - mountPath: /usr/share/filebeat/filebeat.yml
107 name: filebeat-conf
108 subPath: filebeat.yml
109 - mountPath: /var/log/onap
110 name: {{ include "common.fullname" . }}-logs
111 - mountPath: /usr/share/filebeat/data
112 name: {{ include "common.fullname" . }}-data-filebeat
113
114 volumes:
115 - name: localtime
116 hostPath:
117 path: /etc/localtime
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -0400118 - name: {{ include "common.fullname" . }}-data-filebeat
119 emptyDir: {}
120 - name: filebeat-conf
121 configMap:
122 name: {{ include "common.fullname" . }}-filebeat-configmap
123 - name: {{ include "common.fullname" . }}-logs
124 emptyDir: {}
125 - name: {{ include "common.fullname" . }}-auth-secret
126 secret:
127 secretName: {{ include "common.fullname" . }}-auth
128 - name: {{ include "common.fullname" . }}-config
129 configMap:
130 name: {{ include "common.fullname" . }}-configmap
131 items:
132 - key: crud-api.properties
133 path: crud-api.properties
Michael Arrastiaf529a462018-06-13 17:01:15 +0100134 - key: schemaIngest.properties
135 path: schemaIngest.properties
Gurjeet Bedi3bce64b2018-03-27 10:22:52 -0400136 - key: crud-beans.xml
137 path: crud-beans.xml
138 - name: {{ include "common.fullname" . }}-logback-config
139 configMap:
140 name: {{ include "common.fullname" . }}-log-configmap
141 items:
142 - key: logback.xml
143 path: logback.xml
144 - name: {{ include "common.fullname" . }}-model-config
145 configMap:
146 name: {{ include "common.fullname" . }}-model-configmap
147 imagePullSecrets:
kj05b57f82018-03-28 18:10:32 +0300148 - name: "{{ include "common.namespace" . }}-docker-registry-key"