blob: 9faa5800238ca892e344deb6d2054f9af0d32cd3 [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.hello.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
Instrumentalcc3a0bd2019-05-01 14:18:49 -050035 image: {{ .Values.global.repository }}/onap/aaf/aaf_agent:{{.Values.global.aaf.imageVersion}}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000036 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Instrumental378109d2018-10-16 20:40:41 -050037 volumeMounts:
Instrumentalcc3a0bd2019-05-01 14:18:49 -050038 - mountPath: "/opt/app/osaaf/local"
39 name: aaf-hello-vol
40 command: ["bash","-c","/opt/app/aaf_config/bin/pod_wait.sh config nc aaf-cm.{{.Release.Namespace}} 8150 remove && cd /opt/app/osaaf/local && /opt/app/aaf_config/bin/agent.sh"]
Instrumental378109d2018-10-16 20:40:41 -050041 env:
Instrumentalcc3a0bd2019-05-01 14:18:49 -050042 - name: aaf_env
43 value: "{{ .Values.global.aaf.aaf_env }}"
44 - name: cadi_latitude
45 value: "{{ .Values.global.aaf.cadi_latitude }}"
46 - name: cadi_longitude
47 value: "{{ .Values.global.aaf.cadi_longitude }}"
48 - name: aaf_locate_url
49 value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}"
50 - name: aaf_locator_container
51 value: "oom"
52 - name: aaf_release
53 value: "{{ .Values.global.aaf.aaf_release }}"
54 - name: aaf_locator_container_ns
55 value: "{{ .Release.Namespace }}"
56 - name: aaf_locator_container
57 value: "oom"
58 - name: aaf_locator_container_ns
59 value: "{{ .Release.Namespace }}"
60 - name: aaf_locator_app_ns
61 value: "org.osaaf.aaf"
62 - name: "APP_FQDN"
63 value: "{{ .Values.global.aaf.hello.fqdn }}"
64 - name: "APP_FQI"
65 value: "aaf@aaf.osaaf.org"
66 - name: "DEPLOY_FQI"
67 value: "deployer@people.osaaf.org"
68 - name: "DEPLOY_PASSWORD"
69 value: "demo123456!"
70# Hello specific. Clients don't necessarily need this
71 - name: aaf_locator_public_fqdn
72 value: "{{.Values.global.aaf.public_fqdn}}"
73 - name: aaf_locator_name
74 value: "{{.Values.global.aaf.aaf_locator_name}}"
75 - name: aaf_locator_name_oom
76 value: "{{.Values.global.aaf.aaf_locator_name_oom}}"
77 - name: aaf_locator_fqdn_oom
78 value: "%N.%CNS"
kj52dfb132018-03-27 15:50:39 +030079 containers:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000080 - name: {{ include "common.name" . }}
Instrumentalcc3a0bd2019-05-01 14:18:49 -050081 command: ["/bin/bash","-c","cd /opt/app/aaf && exec bin/hello"]
82 image: {{ .Values.global.repository }}/onap/aaf/aaf_hello:{{.Values.global.aaf.imageVersion}}
kj52dfb132018-03-27 15:50:39 +030083 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
84 volumeMounts:
Instrumentalcc3a0bd2019-05-01 14:18:49 -050085 - mountPath: "/opt/app/osaaf/local"
86 name: aaf-hello-vol
87 - mountPath: "/opt/app/aaf/status"
88 name: aaf-status-vol
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000089 - mountPath: /etc/localtime
90 name: localtime
91 readOnly: true
kj52dfb132018-03-27 15:50:39 +030092 {{- if eq .Values.liveness.enabled true }}
93 livenessProbe:
94 tcpSocket:
95 port: {{ .Values.service.internalPort }}
96 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
97 periodSeconds: {{ .Values.liveness.periodSeconds }}
98 {{ end -}}
99 readinessProbe:
100 tcpSocket:
101 port: {{ .Values.service.internalPort }}
102 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
103 periodSeconds: {{ .Values.readiness.periodSeconds }}
104 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000105{{ include "common.resources" . | indent 12 }}
kj52dfb132018-03-27 15:50:39 +0300106 {{- if .Values.nodeSelector }}
107 nodeSelector:
108{{ toYaml .Values.nodeSelector | indent 10 }}
109 {{- end -}}
110 {{- if .Values.affinity }}
111 affinity:
112{{ toYaml .Values.affinity | indent 10 }}
113 {{- end }}
kj52dfb132018-03-27 15:50:39 +0300114 volumes:
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +0000115 - name: localtime
116 hostPath:
117 path: /etc/localtime
Instrumentalcc3a0bd2019-05-01 14:18:49 -0500118 - name: aaf-status-vol
119 persistentVolumeClaim:
120 claimName: {{ .Release.Name }}-aaf-status-pvc
121 - name: aaf-hello-vol
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +0000122 emptyDir: {}
kj52dfb132018-03-27 15:50:39 +0300123 imagePullSecrets:
Instrumental378109d2018-10-16 20:40:41 -0500124 - name: "{{ include "common.namespace" . }}-docker-registry-key"