Merge "[SO] bump the SO modules"
[oom.git] / kubernetes / aaf / components / aaf-hello / templates / deployment.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications © 2020 Orange
3 #
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 apiVersion: apps/v1
16 kind: Deployment
17 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
18 spec:
19   selector: {{- include "common.selectors" . | nindent 4 }}
20   replicas: {{ .Values.replicaCount }}
21   template:
22     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
23     spec:
24       initContainers: {{ include "common.aaf-config" (dict "aafRoot" .Values.aaf_init "dot" .) | nindent 6 }}
25 # CONTAINER Definition
26       containers:
27       - name: {{ include "common.name" . }}
28         command: ["bash","-c","cd /opt/app/aaf && if [ ! -d /opt/app/osaaf/etc ]; then cp -Rf etc logs /opt/app/osaaf; fi && exec bin/hello"]
29         image: {{ .Values.global.repository }}/{{.Values.image }}
30         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
31         ports: {{ include "common.containerPorts" . | nindent 10  }}
32         volumeMounts:  {{ include "common.aaf-config-volume-mountpath" . | nindent 8 }}
33         - mountPath: /etc/localtime
34           name: localtime
35           readOnly: true
36         {{- if eq .Values.liveness.enabled true }}
37         livenessProbe:
38           tcpSocket:
39             port: {{ .Values.liveness.port }}
40           initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
41           periodSeconds: {{ .Values.liveness.periodSeconds }}
42         {{- end }}
43         readinessProbe:
44           tcpSocket:
45             port: {{ .Values.readiness.port }}
46           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
47           periodSeconds: {{ .Values.readiness.periodSeconds }}
48         resources: {{ include "common.resources" . | nindent 12 }}
49       {{- if .Values.nodeSelector }}
50       nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
51       {{- end -}}
52       {{- if .Values.affinity }}
53       affinity: {{ toYaml .Values.affinity | nindent 10 }}
54       {{- end }}
55       volumes: {{ include "common.aaf-config-volumes" (dict "aafRoot" .Values.aaf_init "dot" .) | nindent 6 }}
56       - name: localtime
57         hostPath:
58           path: /etc/localtime
59       imagePullSecrets:
60       - name: "{{ include "common.namespace" . }}-docker-registry-key"