blob: 4addb2b863cdf8556fba59709b8d0c346587342d [file] [log] [blame]
Jakub Latusekdf233a82020-10-21 13:36:29 +02001{{/*
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +02002#============LICENSE_START========================================================
3# ================================================================================
Schmalzried, Terry (ts862m)12db7892020-08-21 20:42:33 -04004# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +02005# Modifications Copyright © 2018 Amdocs, Bell Canada
Jack Lucasd12a1b62021-01-11 12:46:33 -05006# Copyright (c) 2021 J. F. Lucas. All rights reserved.
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +02007# ================================================================================
8# Licensed under the Apache License, Version 2.0 (the "License");
9# you may not use this file except in compliance with the License.
10# You may obtain a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS,
16# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17# See the License for the specific language governing permissions and
18# limitations under the License.
19# ============LICENSE_END=========================================================
Jakub Latusekdf233a82020-10-21 13:36:29 +020020*/}}
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +020021
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020022apiVersion: apps/v1
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +020023kind: Deployment
24metadata:
25 name: {{ include "common.fullname" . }}
26 namespace: {{ include "common.namespace" . }}
27 labels:
28 app: {{ include "common.name" . }}
29 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
30 release: {{ include "common.release" . }}
31 heritage: {{ .Release.Service }}
32spec:
33 replicas: 1
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020034 selector:
35 matchLabels:
36 app: {{ include "common.name" . }}
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +020037 template:
38 metadata:
39 labels:
40 app: {{ include "common.name" . }}
41 release: {{ include "common.release" . }}
42 spec:
43 initContainers:
44 - command:
45 - sh
46 args:
47 - -c
48 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
49 env:
50 - name: PG_ROOT_PASSWORD
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-root-pass" "key" "password") | indent 10 }}
52 volumeMounts:
53 - mountPath: /config-input
54 name: {{ include "common.fullname" . }}-dcae-inputs-input
55 - mountPath: /config
56 name: {{ include "common.fullname" . }}-dcae-inputs
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +010057 image: {{ include "repositoryGenerator.image.envsubst" . }}
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +020058 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
59 name: {{ include "common.name" . }}-update-config
60
61 - name: {{ include "common.name" . }}-readiness
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +010062 image: {{ include "repositoryGenerator.image.readiness" . }}
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +020063 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020065 - /app/ready.py
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +020066 args:
67 - --container-name
68 - dcae-cloudify-manager
69 - --container-name
70 - consul-server
71 - --container-name
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +020072 - dcae-config-binding-service
73 - --container-name
74 - dcae-db
75 - --container-name
76 - dcae-inventory-api
77 - "-t"
78 - "15"
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +020079 env:
80 - name: NAMESPACE
81 valueFrom:
82 fieldRef:
83 apiVersion: v1
84 fieldPath: metadata.namespace
85 - name: init-tls
86 env:
87 - name: POD_IP
88 valueFrom:
89 fieldRef:
90 apiVersion: v1
91 fieldPath: status.podIP
92 - name: aaf_locator_fqdn
93 value: dcae
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +010094 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.tlsImage }}
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +020095 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
96 resources: {}
97 volumeMounts:
98 - mountPath: /opt/app/osaaf
99 name: tls-info
Jack Lucas8c3463e2020-06-12 18:36:55 -0400100 - name: init-consul
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +0100101 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.consulLoaderImage }}
Jack Lucas8c3463e2020-06-12 18:36:55 -0400102 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
103 args:
104 - --service
105 - "config-binding-service|config-binding-service.{{ include "common.namespace" . }}|10000"
106 - --service
107 - "config_binding_service|config-binding-service.{{ include "common.namespace" . }}|10000"
108 resources: {}
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +0200109 containers:
110 - name: {{ include "common.name" . }}
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +0100111 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +0200112 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
113 resources:
114{{ include "common.resources" . | indent 12 }}
115 volumeMounts:
116 - mountPath: /inputs
117 name: {{ include "common.fullname" . }}-dcae-inputs
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +0200118 - mountPath: /etc/localtime
119 name: localtime
120 readOnly: true
121 - mountPath: /certs
122 name: tls-info
123 readOnly: true
124 env:
125 - name: CMADDR
126 value: {{ .Values.config.address.cm.host }}
127 - name: CMPASS
Schmalzried, Terry (ts862m)12db7892020-08-21 20:42:33 -0400128 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cm-pass" "key" "password") | indent 14}}
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +0200129 - name: CMPROTO
130 value: {{ .Values.config.address.cm.proto }}
131 - name: CMPORT
132 value: !!string {{ .Values.config.address.cm.port }}
133 - name: CONSUL
134 value: {{ .Values.config.address.consul.host }}:{{ .Values.config.address.consul.port }}
135 - name: DCAE_NAMESPACE
136 value: {{ .Values.dcae_ns | default "" }}
137 - name: ONAP_NAMESPACE
138 value: {{ include "common.namespace" . }}
farida azmy37481802021-04-11 15:41:32 +0200139 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +0200140 volumes:
141 - name: {{ include "common.fullname" . }}-dcae-inputs-input
142 configMap:
143 name: {{ include "common.fullname" . }}-dcae-inputs
144 - name: {{ include "common.fullname" . }}-dcae-inputs
145 emptyDir:
146 medium: Memory
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +0200147 - name: localtime
148 hostPath:
149 path: /etc/localtime
150 - name: tls-info
151 emptyDir: {}
152 imagePullSecrets:
153 - name: "{{ include "common.namespace" . }}-docker-registry-key"