blob: 60e7c6bcc83312434a03d9e623aafec074684501 [file] [log] [blame]
Jakub Latuseka6d04ad2020-10-21 13:26:45 +02001{{/*
kj52dfb132018-03-27 15:50:39 +03002# Copyright © 2017 Amdocs, Bell Canada
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +02003# Modifications © 2020 Orange
kj52dfb132018-03-27 15:50:39 +03004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Jakub Latuseka6d04ad2020-10-21 13:26:45 +020016*/}}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020017apiVersion: apps/v1
kj52dfb132018-03-27 15:50:39 +030018kind: Deployment
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020019metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
kj52dfb132018-03-27 15:50:39 +030020spec:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020021 selector: {{- include "common.selectors" . | nindent 4 }}
22 replicas: {{ .Values.replicaCount }}
kj52dfb132018-03-27 15:50:39 +030023 template:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020024 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
kj52dfb132018-03-27 15:50:39 +030025 spec:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020026 initContainers: {{ include "common.aaf-config" (dict "aafRoot" .Values.aaf_init "dot" .) | nindent 6 }}
ChrisCec86a532020-03-19 15:53:31 -050027# CONTAINER Definition
kj52dfb132018-03-27 15:50:39 +030028 containers:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000029 - name: {{ include "common.name" . }}
Instrumental0c7bc942019-08-06 16:36:13 -050030 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 Desbureaux0dfa3872020-11-21 21:29:17 +010031 image: {{ include "repositoryGenerator.repository" . }}/{{.Values.image }}
kj52dfb132018-03-27 15:50:39 +030032 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020033 ports: {{ include "common.containerPorts" . | nindent 10 }}
34 volumeMounts: {{ include "common.aaf-config-volume-mountpath" . | nindent 8 }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000035 - mountPath: /etc/localtime
36 name: localtime
37 readOnly: true
kj52dfb132018-03-27 15:50:39 +030038 {{- if eq .Values.liveness.enabled true }}
39 livenessProbe:
40 tcpSocket:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020041 port: {{ .Values.liveness.port }}
kj52dfb132018-03-27 15:50:39 +030042 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
43 periodSeconds: {{ .Values.liveness.periodSeconds }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020044 {{- end }}
kj52dfb132018-03-27 15:50:39 +030045 readinessProbe:
46 tcpSocket:
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020047 port: {{ .Values.readiness.port }}
kj52dfb132018-03-27 15:50:39 +030048 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
49 periodSeconds: {{ .Values.readiness.periodSeconds }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020050 resources: {{ include "common.resources" . | nindent 12 }}
kj52dfb132018-03-27 15:50:39 +030051 {{- if .Values.nodeSelector }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020052 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
kj52dfb132018-03-27 15:50:39 +030053 {{- end -}}
54 {{- if .Values.affinity }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020055 affinity: {{ toYaml .Values.affinity | nindent 10 }}
kj52dfb132018-03-27 15:50:39 +030056 {{- end }}
Sylvain Desbureaux8f9ef352020-04-14 15:02:57 +020057 volumes: {{ include "common.aaf-config-volumes" (dict "aafRoot" .Values.aaf_init "dot" .) | nindent 6 }}
58 - name: localtime
59 hostPath:
60 path: /etc/localtime
61 imagePullSecrets:
62 - name: "{{ include "common.namespace" . }}-docker-registry-key"