blob: 88ec5cbe6677e8d897ca93f2b136d206df080668 [file] [log] [blame]
Jack Lucas332b5e72019-02-06 16:03:13 -05001#============LICENSE_START========================================================
2# ================================================================================
Schmalzried, Terry (ts862m)12db7892020-08-21 20:42:33 -04003# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
marcinrzepeckiwroc9a05dd22020-08-11 11:24:13 +02004# Modifications Copyright © 2020 Nokia
Jack Lucas332b5e72019-02-06 16:03:13 -05005# ================================================================================
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
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020019apiVersion: apps/v1
Jack Lucas332b5e72019-02-06 16:03:13 -050020kind: 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 "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010027 release: {{ include "common.release" . }}
Jack Lucas332b5e72019-02-06 16:03:13 -050028 heritage: {{ .Release.Service }}
29spec:
30 replicas: 1
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020031 selector:
32 matchLabels:
33 app: {{ include "common.name" . }}
Jack Lucas332b5e72019-02-06 16:03:13 -050034 template:
35 metadata:
36 labels:
37 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010038 release: {{ include "common.release" . }}
Jack Lucas332b5e72019-02-06 16:03:13 -050039 spec:
40 initContainers:
41 - name: {{ include "common.name" . }}-readiness
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020042 image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
Jack Lucas332b5e72019-02-06 16:03:13 -050043 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020045 - /app/ready.py
Jack Lucas332b5e72019-02-06 16:03:13 -050046 args:
47 - --container-name
48 - dcae-cloudify-manager
49 - --container-name
50 - consul-server
51 - --container-name
52 - dcae-inventory-api
53 - "-t"
54 - "45"
55 env:
56 - name: NAMESPACE
57 valueFrom:
58 fieldRef:
59 apiVersion: v1
60 fieldPath: metadata.namespace
61 - name: init-tls
62 env:
63 - name: POD_IP
64 valueFrom:
65 fieldRef:
66 apiVersion: v1
67 fieldPath: status.podIP
Jack Lucasc70bc7e2019-09-23 09:02:31 -040068 - name: aaf_locator_fqdn
69 value: dcae
Jack Lucas332b5e72019-02-06 16:03:13 -050070 image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }}
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 resources: {}
73 volumeMounts:
Jack Lucasc70bc7e2019-09-23 09:02:31 -040074 - mountPath: /opt/app/osaaf
Jack Lucas332b5e72019-02-06 16:03:13 -050075 name: tls-info
76 - name: init-consul
77 image: {{ .Values.global.consulLoaderRepository }}/{{ .Values.global.consulLoaderImage }}
78 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
79 args:
80 - --service
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000081 - "cloudify_manager|dcae-cloudify-manager.{{ include "common.namespace" . }}|443"
Jack Lucas332b5e72019-02-06 16:03:13 -050082 - --service
83 - "inventory|inventory.{{ include "common.namespace" . }}|8080"
84 - --key
85 - deployment_handler|/dhconfig/config.json
86 resources: {}
87 volumeMounts:
88 - mountPath: /dhconfig
89 name: dh-config
90 containers:
91 - name: {{ include "common.name" . }}
92 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
93 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
94 resources:
95{{ include "common.resources" . | indent 12 }}
96 ports:
97 - containerPort: {{ .Values.service.internalPort }}
98 # disable liveness probe when breakpoints set in debugger
99 # so K8s doesn't restart unresponsive container
100 {{- if eq .Values.liveness.enabled true }}
101 livenessProbe:
102 tcpSocket:
103 port: {{ .Values.service.internalPort }}
104 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
105 periodSeconds: {{ .Values.liveness.periodSeconds }}
106 {{ end }}
107 readinessProbe:
108 httpGet:
109 path: {{ .Values.readiness.path }}
110 port: {{ .Values.service.internalPort }}
111 scheme: {{ .Values.readiness.scheme }}
112 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
113 periodSeconds: {{ .Values.readiness.periodSeconds }}
114 volumeMounts:
115 - mountPath: /opt/app/dh/log
116 name: component-log
117 - mountPath: /opt/app/dh/etc/cert/
118 name: tls-info
marcinrzepeckiwroc9a05dd22020-08-11 11:24:13 +0200119 - mountPath: /opt/app/dh/etc/
120 name: log4js-conf
Jack Lucas332b5e72019-02-06 16:03:13 -0500121 env:
122 - name: CONSUL_HOST
123 value: consul-server.{{ include "common.namespace" . }}
124 - name: CLOUDIFY_USER
125 value: admin
126 - name: CLOUDIFY_PASSWORD
Schmalzried, Terry (ts862m)12db7892020-08-21 20:42:33 -0400127 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cm-pass" "key" "password") | indent 14 }}
Jack Lucas332b5e72019-02-06 16:03:13 -0500128 - name: CONFIG_BINDING_SERVICE
129 value: config-binding-service
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +0000130 - name: NODE_EXTRA_CA_CERTS
131 value: /opt/app/dh/etc/cert/cacert.pem
Jack Lucas332b5e72019-02-06 16:03:13 -0500132 - name: POD_IP
133 valueFrom:
134 fieldRef:
135 apiVersion: v1
136 fieldPath: status.podIP
137 - name: {{ include "common.name" . }}-filebeat
138 env:
139 - name: POD_IP
140 valueFrom:
141 fieldRef:
142 apiVersion: v1
143 fieldPath: status.podIP
144 image: {{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}
145 imagePullPolicy: IfNotPresent
146 resources: {}
147 volumeMounts:
148 - mountPath: /var/log/onap/deployment-handler
149 name: component-log
150 - mountPath: /usr/share/filebeat/data
151 name: filebeat-data
152 - mountPath: /usr/share/filebeat/filebeat.yml
153 name: filebeat-conf
154 subPath: filebeat.yml
155 volumes:
156 - emptyDir: {}
157 name: component-log
158 - emptyDir: {}
159 name: filebeat-data
160 - configMap:
161 defaultMode: 420
162 name: {{ include "common.fullname" . }}-filebeat-configmap
163 name: filebeat-conf
164 - emptyDir: {}
165 name: tls-info
166 - configMap:
167 defaultMode: 422
168 name: {{ include "common.fullname" . }}-configmap
169 name: dh-config
marcinrzepeckiwroc9a05dd22020-08-11 11:24:13 +0200170 - configMap:
171 defaultMode: 420
172 name: {{include "common.fullname" . }}-log4js-configmap
173 name: log4js-conf
Jack Lucas332b5e72019-02-06 16:03:13 -0500174 imagePullSecrets:
175 - name: "{{ include "common.namespace" . }}-docker-registry-key"