blob: 891b829f432ce0ed566f2fd9a6bb8da7acb37906 [file] [log] [blame]
kj52dfb132018-03-27 15:50:39 +03001# Copyright © 2017 Amdocs, Bell Canada
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +02002# Modifications © 2020 Orange
kj52dfb132018-03-27 15:50:39 +03003#
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.
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020015apiVersion: apps/v1
kj52dfb132018-03-27 15:50:39 +030016kind: Deployment
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020017metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
kj52dfb132018-03-27 15:50:39 +030018spec:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020019 selector: {{- include "common.selectors" . | nindent 4 }}
20 replicas: {{ .Values.replicaCount }}
kj52dfb132018-03-27 15:50:39 +030021 template:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020022 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
kj52dfb132018-03-27 15:50:39 +030023 spec:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020024 initContainers: {{ include "common.aaf-config" (dict "aafRoot" .Values.aaf_init "dot" .) | nindent 6 }}
ChrisCec86a532020-03-19 15:53:31 -050025# CONTAINER Definition
kj52dfb132018-03-27 15:50:39 +030026 containers:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000027 - name: {{ include "common.name" . }}
Instrumental0c7bc942019-08-06 16:36:13 -050028 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"]
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020029 image: {{ .Values.global.repository }}/{{.Values.image }}
kj52dfb132018-03-27 15:50:39 +030030 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020031 ports: {{ include "common.containerPorts" . | nindent 10 }}
32 volumeMounts: {{ include "common.aaf-config-volume-mountpath" . | nindent 8 }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000033 - mountPath: /etc/localtime
34 name: localtime
35 readOnly: true
kj52dfb132018-03-27 15:50:39 +030036 {{- if eq .Values.liveness.enabled true }}
37 livenessProbe:
38 tcpSocket:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020039 port: {{ .Values.liveness.port }}
kj52dfb132018-03-27 15:50:39 +030040 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
41 periodSeconds: {{ .Values.liveness.periodSeconds }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020042 {{- end }}
kj52dfb132018-03-27 15:50:39 +030043 readinessProbe:
44 tcpSocket:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020045 port: {{ .Values.readiness.port }}
kj52dfb132018-03-27 15:50:39 +030046 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
47 periodSeconds: {{ .Values.readiness.periodSeconds }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020048 resources: {{ include "common.resources" . | nindent 12 }}
kj52dfb132018-03-27 15:50:39 +030049 {{- if .Values.nodeSelector }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020050 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
kj52dfb132018-03-27 15:50:39 +030051 {{- end -}}
52 {{- if .Values.affinity }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020053 affinity: {{ toYaml .Values.affinity | nindent 10 }}
kj52dfb132018-03-27 15:50:39 +030054 {{- end }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020055 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"