Jakub Latusek | a6d04ad | 2020-10-21 13:26:45 +0200 | [diff] [blame] | 1 | {{/* |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, Bell Canada |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 3 | # Modifications © 2020 Orange |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 4 | # |
| 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 Latusek | a6d04ad | 2020-10-21 13:26:45 +0200 | [diff] [blame] | 16 | */}} |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 17 | apiVersion: apps/v1 |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 18 | kind: Deployment |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 19 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 20 | spec: |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 21 | selector: {{- include "common.selectors" . | nindent 4 }} |
| 22 | replicas: {{ .Values.replicaCount }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 23 | template: |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 24 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 25 | spec: |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 26 | initContainers: {{ include "common.aaf-config" (dict "aafRoot" .Values.aaf_init "dot" .) | nindent 6 }} |
ChrisC | ec86a53 | 2020-03-19 15:53:31 -0500 | [diff] [blame] | 27 | # CONTAINER Definition |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 28 | containers: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 29 | - name: {{ include "common.name" . }} |
Instrumental | 0c7bc94 | 2019-08-06 16:36:13 -0500 | [diff] [blame] | 30 | 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 Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 31 | image: {{ .Values.global.repository }}/{{.Values.image }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 32 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 33 | ports: {{ include "common.containerPorts" . | nindent 10 }} |
| 34 | volumeMounts: {{ include "common.aaf-config-volume-mountpath" . | nindent 8 }} |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 35 | - mountPath: /etc/localtime |
| 36 | name: localtime |
| 37 | readOnly: true |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 38 | {{- if eq .Values.liveness.enabled true }} |
| 39 | livenessProbe: |
| 40 | tcpSocket: |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 41 | port: {{ .Values.liveness.port }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 42 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 43 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 44 | {{- end }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 45 | readinessProbe: |
| 46 | tcpSocket: |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 47 | port: {{ .Values.readiness.port }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 48 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 49 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 50 | resources: {{ include "common.resources" . | nindent 12 }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 51 | {{- if .Values.nodeSelector }} |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 52 | nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 53 | {{- end -}} |
| 54 | {{- if .Values.affinity }} |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 55 | affinity: {{ toYaml .Values.affinity | nindent 10 }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 56 | {{- end }} |
Sylvain Desbureaux | 8f9ef35 | 2020-04-14 15:02:57 +0200 | [diff] [blame] | 57 | 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" |