blob: 9009f6b114ca46209c7875ae2d10fef21e5936c3 [file] [log] [blame]
Krzysztof Opasiak9cb82032020-05-05 12:04:31 +02001#============LICENSE_START========================================================
2# ================================================================================
3# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
4# Modifications Copyright © 2018 Amdocs, Bell Canada
5# ================================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17# ============LICENSE_END=========================================================
18
19apiVersion: extensions/v1beta1
20kind: Deployment
21metadata:
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
24 labels:
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
29spec:
30 replicas: 1
31 template:
32 metadata:
33 labels:
34 app: {{ include "common.name" . }}
35 release: {{ include "common.release" . }}
36 spec:
37 initContainers:
38 - command:
39 - sh
40 args:
41 - -c
42 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
43 env:
44 - name: PG_ROOT_PASSWORD
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-root-pass" "key" "password") | indent 10 }}
46 volumeMounts:
47 - mountPath: /config-input
48 name: {{ include "common.fullname" . }}-dcae-inputs-input
49 - mountPath: /config
50 name: {{ include "common.fullname" . }}-dcae-inputs
51 image: "{{ .Values.global.envsubstImage }}"
52 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 name: {{ include "common.name" . }}-update-config
54
55 - name: {{ include "common.name" . }}-readiness
56 image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
57 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
58 command:
59 - /root/ready.py
60 args:
61 - --container-name
62 - dcae-cloudify-manager
63 - --container-name
64 - consul-server
65 - --container-name
66 - msb-discovery
67 - --container-name
68 - kube2msb
69 - --container-name
70 - dcae-config-binding-service
71 - --container-name
72 - dcae-db
73 - --container-name
74 - dcae-inventory-api
75 - "-t"
76 - "15"
77
78 env:
79 - name: NAMESPACE
80 valueFrom:
81 fieldRef:
82 apiVersion: v1
83 fieldPath: metadata.namespace
84 - name: init-tls
85 env:
86 - name: POD_IP
87 valueFrom:
88 fieldRef:
89 apiVersion: v1
90 fieldPath: status.podIP
91 - name: aaf_locator_fqdn
92 value: dcae
93 image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }}
94 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
95 resources: {}
96 volumeMounts:
97 - mountPath: /opt/app/osaaf
98 name: tls-info
99 containers:
100 - name: {{ include "common.name" . }}
101 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
102 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
103 resources:
104{{ include "common.resources" . | indent 12 }}
105 volumeMounts:
106 - mountPath: /inputs
107 name: {{ include "common.fullname" . }}-dcae-inputs
108 - mountPath: /dcae-configs
109 name: {{ include "common.fullname" . }}-dcae-config
110 - mountPath: /etc/localtime
111 name: localtime
112 readOnly: true
113 - mountPath: /certs
114 name: tls-info
115 readOnly: true
116 env:
117 - name: CMADDR
118 value: {{ .Values.config.address.cm.host }}
119 - name: CMPASS
120 valueFrom:
121 secretKeyRef:
122 name: {{ include "common.name" . }}-cmpass
123 key: password
124 - name: CMPROTO
125 value: {{ .Values.config.address.cm.proto }}
126 - name: CMPORT
127 value: !!string {{ .Values.config.address.cm.port }}
128 - name: CONSUL
129 value: {{ .Values.config.address.consul.host }}:{{ .Values.config.address.consul.port }}
130 - name: DCAE_NAMESPACE
131 value: {{ .Values.dcae_ns | default "" }}
132 - name: ONAP_NAMESPACE
133 value: {{ include "common.namespace" . }}
134 volumes:
135 - name: {{ include "common.fullname" . }}-dcae-inputs-input
136 configMap:
137 name: {{ include "common.fullname" . }}-dcae-inputs
138 - name: {{ include "common.fullname" . }}-dcae-inputs
139 emptyDir:
140 medium: Memory
141 - name: {{ include "common.fullname" . }}-dcae-config
142 configMap:
143 name: {{ include "common.fullname" . }}-dcae-config
144 - name: localtime
145 hostPath:
146 path: /etc/localtime
147 - name: tls-info
148 emptyDir: {}
149 imagePullSecrets:
150 - name: "{{ include "common.namespace" . }}-docker-registry-key"