Merge "Add FCAPS to oom"
[oom.git] / kubernetes / oof / charts / oof-cmso / charts / oof-cmso-topology / templates / deployment.yaml
1 # Copyright © 2018 AT&T
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.
14
15 apiVersion: extensions/v1beta1
16 kind: Deployment
17 metadata:
18   name: {{ include "common.fullname" . }}
19   namespace: {{ include "common.namespace" . }}
20   labels:
21     app: {{ include "common.name" . }}
22     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23     release: {{ .Release.Name }}
24     heritage: {{ .Release.Service }}
25 spec:
26   replicas: {{ .Values.replicaCount }}
27   template:
28     metadata:
29       labels:
30         app: {{ include "common.name" . }}
31         release: {{ .Release.Name }}
32     spec:
33       containers:
34       - name: {{ include "common.name" . }}
35         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
36         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
37         env:
38         - name: JAVA_TRUSTSTORE
39           value: /share/etc/certs/{{ .Values.global.truststoreFile }}
40         - name: SSL_KEYSTORE
41           value: /share/etc/certs/{{ .Values.global.keystoreFile }}
42         - name: JAVA_TRUSTSTORE_PASSWORD
43           value: {{ .Values.global.truststorePassword }}
44         - name: SSL_KEYSTORE_PASSWORD
45           value: {{ .Values.global.keystorePassword }}
46         - name: AUTHENTICATION
47           value: {{ .Values.global.authentication }}
48         ports:
49         - containerPort: {{ .Values.service.internalPort }}
50         # disable liveness probe when breakpoints set in debugger
51         # so K8s doesn't restart unresponsive container
52         {{- if eq .Values.liveness.enabled true }}
53         livenessProbe:
54           tcpSocket:
55             port: {{ .Values.service.internalPort }}
56           initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
57           periodSeconds: {{ .Values.liveness.periodSeconds }}
58         {{ end -}}
59         readinessProbe:
60           tcpSocket:
61             port: {{ .Values.service.internalPort }}
62           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
63           periodSeconds: {{ .Values.readiness.periodSeconds }}
64         volumeMounts:
65         - name: {{ include "common.fullname" . }}-logs
66           mountPath: /share/logs
67         - name: {{ include "common.fullname" . }}-logs
68           mountPath: /share/debug-logs
69         - name: {{ include "common.fullname" . }}-config
70           mountPath: /share/etc/config
71         - name: {{ include "common.fullname" . }}-certs
72           mountPath: /share/etc/certs
73         - name: {{ include "common.fullname" . }}-certs
74           mountPath: /opt/app/cmso/src/main/resources/aaf
75         resources:
76 {{ include "common.resources" . | indent 12 }}
77         {{- if .Values.nodeSelector }}
78         nodeSelector:
79 {{ toYaml .Values.nodeSelector | indent 10 }}
80         {{- end -}}
81         {{- if .Values.affinity }}
82         affinity:
83 {{ toYaml .Values.affinity | indent 10 }}
84         {{- end }}
85       volumes:
86         - name: {{ include "common.fullname" . }}-config
87           configMap:
88             name: {{ include "common.fullname" . }}
89             items:
90             - key: logback.xml
91               path: logback.xml
92             - key: cadi.properties
93               path: cadi.properties
94             - key: topology.properties
95               path: topology.properties
96         - name:  {{ include "common.fullname" . }}-logs
97           emptyDir: {}
98         - name: {{ include "common.fullname" . }}-certs
99           secret:
100             secretName: {{ .Release.Name }}-{{ .Values.global.commonConfigPrefix }}-certs
101       imagePullSecrets:
102       - name: "{{ include "common.namespace" . }}-docker-registry-key"