blob: ec35115420c6e22848b0b102d74d2ac98dfdfd4c [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 "+" "_" }}
21 release: {{ .Release.Name }}
22 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.service.replicas }}
kj52dfb132018-03-27 15:50:39 +030027 template:
28 metadata:
29 labels:
30 app: {{ include "common.name" . }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000031 release: {{ .Release.Name }}
kj52dfb132018-03-27 15:50:39 +030032 spec:
33 initContainers:
Instrumental378109d2018-10-16 20:40:41 -050034 - name: {{ include "common.name" . }}-config-container
Instrumental0c7bc942019-08-06 16:36:13 -050035 image: {{ .Values.global.repository }}/{{.Values.global.aaf.config.image}}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000036 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Instrumentalcc3a0bd2019-05-01 14:18:49 -050037 command: ["bash","-c","cd /opt/app/aaf_config && bin/pod_wait.sh config nc aaf-cass.{{ .Release.Namespace }} 9042 sleep 15 remove && bin/agent.sh"]
Instrumental378109d2018-10-16 20:40:41 -050038 volumeMounts:
39 - mountPath: "/opt/app/osaaf"
Instrumentalcc3a0bd2019-05-01 14:18:49 -050040 name: aaf-config-vol
41 - mountPath: "/opt/app/aaf/status"
42 name: aaf-status-vol
Instrumental378109d2018-10-16 20:40:41 -050043 env:
Instrumentalcc3a0bd2019-05-01 14:18:49 -050044 - name: aaf_env
45 value: "{{ .Values.global.aaf.aaf_env }}"
46 - name: cadi_latitude
47 value: "{{ .Values.global.aaf.cadi_latitude }}"
48 - name: cadi_longitude
49 value: "{{ .Values.global.aaf.cadi_longitude }}"
50 - name: cadi_x509_issuers
51 value: "{{ .Values.global.aaf.cadi_x509_issuers }}"
52 - name: aaf_locate_url
53 value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}"
54 - name: aaf_locator_container
55 value: "oom"
56 - name: aaf_release
57 value: "{{ .Values.global.aaf.aaf_release }}"
58 - name: aaf_locator_container_ns
59 value: "{{ .Release.Namespace }}"
60 - name: aaf_locator_public_fqdn
61 value: "{{.Values.global.aaf.public_fqdn}}"
62 - name: aaf_locator_name
63 value: "{{.Values.global.aaf.aaf_locator_name}}"
64 - name: aaf_locator_name_oom
65 value: "{{.Values.global.aaf.aaf_locator_name_oom}}"
Instrumental0c7bc942019-08-06 16:36:13 -050066 - name: cm_always_ignore_ips
67 value: "true"
Instrumentalcc3a0bd2019-05-01 14:18:49 -050068 - name: CASSANDRA_CLUSTER
69 value: "{{.Values.global.aaf.cass.fqdn}}.{{ .Release.Namespace }}"
70# - name: CASSANDRA_USER
71# value: ""
72# - name: CASSANDRA_PASSWORD
73# value: ""
74# - name: CASSANDRA_PORT
75# value: ""
kj52dfb132018-03-27 15:50:39 +030076 containers:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000077 - name: {{ include "common.name" . }}
Instrumental0c7bc942019-08-06 16:36:13 -050078 command: ["/bin/bash","-c","cd /opt/app/aaf && bin/pod_wait.sh aaf-service aaf-cass && exec bin/service"]
79 image: {{.Values.global.repository}}/{{.Values.global.aaf.image}}
kj52dfb132018-03-27 15:50:39 +030080 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Instrumental0c7bc942019-08-06 16:36:13 -050081 env:
82 - name: cm_always_ignore_ips
83 value: "true"
Instrumentalcc3a0bd2019-05-01 14:18:49 -050084 lifecycle:
85 preStop:
86 exec:
87 command: ["/bin/sh","-c","rm /opt/app/aaf/status/aaf-service* && echo $HOSTNAME >> aaf-service.hosts"]
kj52dfb132018-03-27 15:50:39 +030088 volumeMounts:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000089 - mountPath: "/opt/app/osaaf"
Instrumentalcc3a0bd2019-05-01 14:18:49 -050090 name: aaf-config-vol
91 - mountPath: "/opt/app/aaf/status"
92 name: aaf-status-vol
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000093 - mountPath: /etc/localtime
94 name: localtime
95 readOnly: true
kj52dfb132018-03-27 15:50:39 +030096 {{- if eq .Values.liveness.enabled true }}
97 livenessProbe:
98 tcpSocket:
Instrumentalcc3a0bd2019-05-01 14:18:49 -050099 port: {{ .Values.global.aaf.service.internal_port }}
kj52dfb132018-03-27 15:50:39 +0300100 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
101 periodSeconds: {{ .Values.liveness.periodSeconds }}
102 {{ end -}}
103 readinessProbe:
104 tcpSocket:
Instrumentalcc3a0bd2019-05-01 14:18:49 -0500105 port: {{ .Values.global.aaf.service.internal_port }}
kj52dfb132018-03-27 15:50:39 +0300106 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
107 periodSeconds: {{ .Values.readiness.periodSeconds }}
108 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000109{{ include "common.resources" . | indent 12 }}
kj52dfb132018-03-27 15:50:39 +0300110 {{- if .Values.nodeSelector }}
111 nodeSelector:
112{{ toYaml .Values.nodeSelector | indent 10 }}
113 {{- end -}}
114 {{- if .Values.affinity }}
115 affinity:
116{{ toYaml .Values.affinity | indent 10 }}
117 {{- end }}
kj52dfb132018-03-27 15:50:39 +0300118 volumes:
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +0000119 - name: localtime
120 hostPath:
121 path: /etc/localtime
Instrumentalcc3a0bd2019-05-01 14:18:49 -0500122 - name: aaf-status-vol
123 persistentVolumeClaim:
Sylvain Desbureaux7a235752019-11-28 15:01:45 +0100124 claimName: {{ .Release.Name }}-aaf-status
Instrumentalcc3a0bd2019-05-01 14:18:49 -0500125 - name: aaf-config-vol
126 persistentVolumeClaim:
Sylvain Desbureaux7a235752019-11-28 15:01:45 +0100127 claimName: {{ .Release.Name }}-aaf-config
kj52dfb132018-03-27 15:50:39 +0300128 imagePullSecrets:
Instrumental378109d2018-10-16 20:40:41 -0500129 - name: "{{ include "common.namespace" . }}-docker-registry-key"