blob: cbf68aad373a5498671043fa6c4a27bc454484a5 [file] [log] [blame]
kj52dfb132018-03-27 15:50:39 +03001# Copyright © 2017 Amdocs, Bell Canada
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
15apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
18 labels:
19 app: {{ include "common.name" . }}
20 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010021 release: {{ include "common.release" . }}
kj52dfb132018-03-27 15:50:39 +030022 heritage: {{ .Release.Service }}
23 name: {{ include "common.fullname" . }}
24 namespace: {{ include "common.namespace" . }}
25spec:
Instrumentalcc3a0bd2019-05-01 14:18:49 -050026 replicas: {{ .Values.global.aaf.gui.replicas }}
kj52dfb132018-03-27 15:50:39 +030027 template:
28 metadata:
29 labels:
30 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010031 release: {{ include "common.release" . }}
kj52dfb132018-03-27 15:50:39 +030032 spec:
33 initContainers:
ChrisCec86a532020-03-19 15:53:31 -050034 - name: fix-permission
35 command:
36 - /bin/sh
37 args:
38 - -c
39 - |
40 chmod -R 775 /opt/app/aaf/status
41 chown -R 1000:1000 /opt/app/aaf/status
42 chmod -R 775 /opt/app/osaaf
43 chown -R 1000:1000 /opt/app/osaaf
44 image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
45 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
46 volumeMounts:
47 - mountPath: /opt/app/osaaf
48 name: aaf-config-vol
49 - mountPath: /opt/app/aaf/status
50 name: aaf-status-vol
Instrumental378109d2018-10-16 20:40:41 -050051 - name: {{ include "common.name" . }}-config-container
Instrumental0c7bc942019-08-06 16:36:13 -050052 image: {{ .Values.global.repository }}/{{.Values.global.aaf.config.image}}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000053 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
ChrisCec86a532020-03-19 15:53:31 -050054 command: ["bash","-c","cd /opt/app/aaf_config && bin/pod_wait.sh config aaf-service aaf-locate remove && bin/agent.sh"]
Instrumental378109d2018-10-16 20:40:41 -050055 volumeMounts:
56 - mountPath: "/opt/app/osaaf"
Instrumentalcc3a0bd2019-05-01 14:18:49 -050057 name: aaf-config-vol
58 - mountPath: "/opt/app/aaf/status"
59 name: aaf-status-vol
Instrumental378109d2018-10-16 20:40:41 -050060 env:
Instrumentalcc3a0bd2019-05-01 14:18:49 -050061 - name: aaf_env
62 value: "{{ .Values.global.aaf.aaf_env }}"
63 - name: cadi_latitude
64 value: "{{ .Values.global.aaf.cadi_latitude }}"
65 - name: cadi_longitude
66 value: "{{ .Values.global.aaf.cadi_longitude }}"
67 - name: cadi_x509_issuers
68 value: "{{ .Values.global.aaf.cadi_x509_issuers }}"
69 - name: aaf_locate_url
70 value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}"
71 - name: aaf_locator_container
72 value: "oom"
73 - name: aaf_release
74 value: "{{ .Values.global.aaf.aaf_release }}"
75 - name: aaf_locator_container_ns
76 value: "{{ .Release.Namespace }}"
Instrumentalcc3a0bd2019-05-01 14:18:49 -050077 - name: aaf_locator_public_fqdn
78 value: "{{.Values.global.aaf.public_fqdn}}"
79 - name: aaf_locator_name
80 value: "{{.Values.global.aaf.aaf_locator_name}}"
81 - name: aaf_locator_name_oom
82 value: "{{.Values.global.aaf.aaf_locator_name_oom}}"
Instrumental0c7bc942019-08-06 16:36:13 -050083 - name: cm_always_ignore_ips
84 value: "true"
Instrumentalcc3a0bd2019-05-01 14:18:49 -050085 - name: CASSANDRA_CLUSTER
86 value: "{{.Values.global.aaf.cass.fqdn}}.{{ .Release.Namespace }}"
87# - name: CASSANDRA_USER
88# value: ""
89# - name: CASSANDRA_PASSWORD
90# value: ""
91# - name: CASSANDRA_PORT
Instrumental0c7bc942019-08-06 16:36:13 -050092# value: ""
kj52dfb132018-03-27 15:50:39 +030093 containers:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000094 - name: {{ include "common.name" . }}
Instrumentalcc3a0bd2019-05-01 14:18:49 -050095 command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-gui aaf-locate && exec bin/gui"]
Instrumental0c7bc942019-08-06 16:36:13 -050096 image: {{ .Values.global.repository }}/{{.Values.global.aaf.image}}
kj52dfb132018-03-27 15:50:39 +030097 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
98 volumeMounts:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000099 - mountPath: "/opt/app/osaaf"
Instrumentalcc3a0bd2019-05-01 14:18:49 -0500100 name: aaf-config-vol
101 - mountPath: "/opt/app/aaf/status"
102 name: aaf-status-vol
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +0000103 - mountPath: /etc/localtime
104 name: localtime
105 readOnly: true
kj52dfb132018-03-27 15:50:39 +0300106 {{- if eq .Values.liveness.enabled true }}
107 livenessProbe:
108 tcpSocket:
Instrumentalcc3a0bd2019-05-01 14:18:49 -0500109 port: {{ .Values.global.aaf.gui.internal_port }}
kj52dfb132018-03-27 15:50:39 +0300110 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
111 periodSeconds: {{ .Values.liveness.periodSeconds }}
112 {{ end -}}
113 readinessProbe:
114 tcpSocket:
Instrumentalcc3a0bd2019-05-01 14:18:49 -0500115 port: {{ .Values.global.aaf.gui.internal_port }}
kj52dfb132018-03-27 15:50:39 +0300116 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
117 periodSeconds: {{ .Values.readiness.periodSeconds }}
118 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000119{{ include "common.resources" . | indent 12 }}
kj52dfb132018-03-27 15:50:39 +0300120 {{- if .Values.nodeSelector }}
121 nodeSelector:
122{{ toYaml .Values.nodeSelector | indent 10 }}
123 {{- end -}}
124 {{- if .Values.affinity }}
125 affinity:
126{{ toYaml .Values.affinity | indent 10 }}
127 {{- end }}
kj52dfb132018-03-27 15:50:39 +0300128 volumes:
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +0000129 - name: localtime
130 hostPath:
131 path: /etc/localtime
Instrumentalcc3a0bd2019-05-01 14:18:49 -0500132 - name: aaf-status-vol
133 persistentVolumeClaim:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100134 claimName: {{ include "common.release" . }}-aaf-status
Instrumentalcc3a0bd2019-05-01 14:18:49 -0500135 - name: aaf-config-vol
136 persistentVolumeClaim:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100137 claimName: {{ include "common.release" . }}-aaf-config
kj52dfb132018-03-27 15:50:39 +0300138 imagePullSecrets:
Instrumental378109d2018-10-16 20:40:41 -0500139 - name: "{{ include "common.namespace" . }}-docker-registry-key"