blob: ea487d05716ccd2c417c6da52be49dacd63fcd7e [file] [log] [blame]
Fiachra Corcoranbe966552018-08-07 16:58:45 +01001# Copyright © 2017 Amdocs, Bell Canada
2#
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.
14apiVersion: extensions/v1beta1
15kind: Deployment
16metadata:
17 name: {{ include "common.fullname" . }}
18 namespace: {{ include "common.namespace" . }}
19 labels:
20 app: {{ include "common.name" . }}
21 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
22 release: {{ .Release.Name }}
23 heritage: {{ .Release.Service }}
24spec:
25 replicas: {{ .Values.replicaCount }}
26 template:
27 metadata:
28 labels:
29 app: {{ include "common.name" . }}
30 release: {{ .Release.Name }}
31 spec:
efiacor7b9a0872019-08-28 21:20:22 +000032 hostname: {{ .Values.global.dmaapDrProvName }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010033 initContainers:
34 - command:
35 - /root/ready.py
36 args:
37 - --container-name
efiacor7b9a0872019-08-28 21:20:22 +000038 - {{ .Values.config.dmaapDrDb.mariadbContName }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010039 env:
40 - name: NAMESPACE
41 valueFrom:
42 fieldRef:
43 apiVersion: v1
44 fieldPath: metadata.namespace
45 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 name: {{ include "common.name" . }}-readiness
48 containers:
49 - name: {{ include "common.name" . }}
50 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 ports:
efiacor7b9a0872019-08-28 21:20:22 +000053 - containerPort: {{ .Values.global.dmaapDrProvExtPort }}
54 - containerPort: {{ .Values.global.dmaapDrProvExtPort2 }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010055 {{- if eq .Values.liveness.enabled true }}
56 livenessProbe:
57 tcpSocket:
efiacor7b9a0872019-08-28 21:20:22 +000058 port: {{ .Values.global.dmaapDrProvExtPort }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010059 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
60 periodSeconds: {{ .Values.liveness.periodSeconds }}
61 {{ end -}}
62 readinessProbe:
63 tcpSocket:
efiacor7b9a0872019-08-28 21:20:22 +000064 port: {{ .Values.global.dmaapDrProvExtPort }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010065 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
66 periodSeconds: {{ .Values.readiness.periodSeconds }}
67 volumeMounts:
68 - mountPath: /etc/localtime
69 name: localtime
70 readOnly: false
71 - mountPath: /opt/app/datartr/etc/provserver.properties
efiacoreabb6522019-04-08 09:46:09 +000072 name: {{ include "common.fullname" . }}-config
Fiachra Corcoranbe966552018-08-07 16:58:45 +010073 subPath: provserver.properties
efiacoreabb6522019-04-08 09:46:09 +000074 - mountPath: /opt/app/datartr/etc/drProvCadi.properties
75 name: {{ include "common.fullname" . }}-config
76 subPath: drProvCadi.properties
efiacor7b9a0872019-08-28 21:20:22 +000077 - mountPath: /opt/app/datartr/etc/logback.xml
78 name: {{ include "common.fullname" . }}-log-conf
79 subPath: logback.xml
efiacoreabb6522019-04-08 09:46:09 +000080 - mountPath: {{ .Values.global.loggingDirectory }}
81 name: {{ include "common.fullname" . }}-logs
Fiachra Corcoranbe966552018-08-07 16:58:45 +010082 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000083{{ include "common.resources" . | indent 12 }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010084 {{- if .Values.nodeSelector }}
85 nodeSelector:
86{{ toYaml .Values.nodeSelector | indent 10 }}
87 {{- end -}}
88 {{- if .Values.affinity }}
89 affinity:
90{{ toYaml .Values.affinity | indent 10 }}
91 {{- end }}
econwar378cf192019-01-08 16:19:59 +000092 # Filebeat sidecar container
EmmettCox6065d3e2019-04-12 09:45:30 +000093 - name: {{ include "common.name" . }}-filebeat-onap
econwar378cf192019-01-08 16:19:59 +000094 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
95 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
96 volumeMounts:
97 - name: {{ include "common.fullname" . }}-filebeat-conf
98 mountPath: /usr/share/filebeat/filebeat.yml
99 subPath: filebeat.yml
100 - name: {{ include "common.fullname" . }}-data-filebeat
101 mountPath: /usr/share/filebeat/data
102 - name: {{ include "common.fullname" . }}-logs
103 mountPath: /var/log/onap/datarouter-prov
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100104 volumes:
105 - name: localtime
106 hostPath:
107 path: /etc/localtime
efiacoreabb6522019-04-08 09:46:09 +0000108 - name: {{ include "common.fullname" . }}-config
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100109 configMap:
efiacoreabb6522019-04-08 09:46:09 +0000110 name: {{ include "common.fullname" . }}-configmap
111 items:
112 - key: provserver.properties
113 path: provserver.properties
114 - key: drProvCadi.properties
115 path: drProvCadi.properties
econwar378cf192019-01-08 16:19:59 +0000116 - name: {{ include "common.fullname" . }}-log-conf
117 configMap:
118 name: {{ include "common.fullname" . }}-log
119 - name: {{ include "common.fullname" . }}-filebeat-conf
120 configMap:
efiacor7b9a0872019-08-28 21:20:22 +0000121 name: {{ include "common.fullname" . }}-dmaap-dr-prov-filebeat-configmap
econwar378cf192019-01-08 16:19:59 +0000122 - name: {{ include "common.fullname" . }}-data-filebeat
123 emptyDir: {}
124 - name: {{ include "common.fullname" . }}-logs
125 emptyDir: {}
Sylvain Desbureaux435ef532018-12-20 10:58:09 +0100126 imagePullSecrets:
127 - name: "{{ include "common.namespace" . }}-docker-registry-key"