Merge "Update OOM to for HTTPS for Network Discovery"
[oom.git] / kubernetes / pomba / charts / pomba-networkdiscovery / templates / deployment.yaml
1 # Copyright © 2018 Amdocs\r
2 #\r
3 # Licensed under the Apache License, Version 2.0 (the "License");\r
4 # you may not use this file except in compliance with the License.\r
5 # You may obtain a copy of the License at\r
6 #\r
7 #       http://www.apache.org/licenses/LICENSE-2.0\r
8 #\r
9 # Unless required by applicable law or agreed to in writing, software\r
10 # distributed under the License is distributed on an "AS IS" BASIS,\r
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
12 # See the License for the specific language governing permissions and\r
13 # limitations under the License.\r
14 \r
15 apiVersion: extensions/v1beta1\r
16 kind: Deployment\r
17 metadata:\r
18   name: {{ include "common.fullname" . }}\r
19   namespace: {{ include "common.namespace" . }}\r
20   labels:\r
21     app: {{ include "common.name" . }}\r
22     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}\r
23     release: {{ .Release.Name }}\r
24     heritage: {{ .Release.Service }}\r
25 spec:\r
26   replicas: {{ .Values.replicaCount }}\r
27   template:\r
28     metadata:\r
29       labels:\r
30         app: {{ include "common.name" . }}\r
31         release: {{ .Release.Name }}\r
32     spec:\r
33       containers:\r
34         - name: {{ include "common.name" . }}\r
35           image: "{{ include "common.repository" . }}/{{ .Values.image }}"\r
36           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}\r
37           ports:\r
38           - containerPort: {{ .Values.service.internalPort }}\r
39           # disable liveness probe when breakpoints set in debugger\r
40           # so K8s doesn't restart unresponsive container\r
41           {{ if .Values.liveness.enabled }}\r
42           livenessProbe:\r
43             tcpSocket:\r
44               port: {{ .Values.service.internalPort }}\r
45             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}\r
46             periodSeconds: {{ .Values.liveness.periodSeconds }}\r
47           {{ end }}\r
48           readinessProbe:\r
49             tcpSocket:\r
50               port: {{ .Values.service.internalPort }}\r
51             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}\r
52             periodSeconds: {{ .Values.readiness.periodSeconds }}\r
53           env:\r
54           volumeMounts:\r
55           - mountPath: /etc/localtime\r
56             name: localtime\r
57             readOnly: true\r
58           - name: {{ include "common.fullname" . }}-logs\r
59             mountPath: /var/log/onap\r
60           - mountPath: /opt/app/config/logback.xml\r
61             name: {{ include "common.fullname" . }}-log-conf\r
62             subPath: logback.xml\r
63           - mountPath: /opt/app/config/application.properties\r
64             name: {{ include "common.fullname" . }}-config\r
65             subPath: application.properties\r
66             readOnly: true\r
67           - mountPath: /opt/app/config/auth/client-cert-onap.p12\r
68             name: {{ include "common.fullname" . }}-auth-secret\r
69             subPath: client-cert-onap.p12\r
70             readOnly: true\r
71           - mountPath: /opt/app/config/auth/tomcat_keystore\r
72             name: {{ include "common.fullname" . }}-auth-secret\r
73             subPath: tomcat_keystore\r
74             readOnly: true\r
75 \r
76           resources:\r
77 {{ include "common.resources" . | indent 12 }}\r
78         {{- if .Values.nodeSelector }}\r
79         nodeSelector:\r
80 {{ toYaml .Values.nodeSelector | indent 10 }}\r
81         {{- end -}}\r
82         {{- if .Values.affinity }}\r
83         affinity:\r
84 {{ toYaml .Values.affinity | indent 10 }}\r
85         {{- end }}\r
86 \r
87         # Filebeat sidecar container\r
88         - name: {{ include "common.name" . }}-filebeat-onap\r
89           image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"\r
90           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}\r
91           volumeMounts:\r
92           - name: {{ include "common.fullname" . }}-filebeat-conf\r
93             mountPath: /usr/share/filebeat/filebeat.yml\r
94             subPath: filebeat.yml\r
95           - name: {{ include "common.fullname" . }}-data-filebeat\r
96             mountPath: /usr/share/filebeat/data\r
97           - name: {{ include "common.fullname" . }}-logs\r
98             mountPath: /var/log/onap\r
99 \r
100       volumes:\r
101         - name: localtime\r
102           hostPath:\r
103             path: /etc/localtime\r
104         - name:  {{ include "common.fullname" . }}-logs\r
105           emptyDir: {}\r
106         - name: {{ include "common.fullname" . }}-log-conf\r
107           configMap:\r
108             name: {{ include "common.fullname" . }}-log\r
109         - name: {{ include "common.fullname" . }}-config\r
110           configMap:\r
111             name: {{ include "common.fullname" . }}-configmap\r
112         - name: {{ include "common.fullname" . }}-auth-secret\r
113           secret:\r
114             secretName: {{ include "common.fullname" . }}-auth\r
115         - name: {{ include "common.fullname" . }}-filebeat-conf\r
116           configMap:\r
117             name: {{ .Release.Name }}-pomba-filebeat-configmap\r
118         - name: {{ include "common.fullname" . }}-data-filebeat\r
119           emptyDir: {}\r
120 \r
121       imagePullSecrets:\r
122       - name: "{{ include "common.namespace" . }}-docker-registry-key"\r