blob: 1b39dc6e2fd86301af383182398286839fc27490 [file] [log] [blame]
Jakub Latusekdf233a82020-10-21 13:36:29 +02001{{/*
Jack Lucas332b5e72019-02-06 16:03:13 -05002#============LICENSE_START========================================================
3# ================================================================================
Schmalzried, Terry (ts862m)12db7892020-08-21 20:42:33 -04004# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
marcinrzepeckiwroc9a05dd22020-08-11 11:24:13 +02005# Modifications Copyright © 2020 Nokia
Jack Lucas332b5e72019-02-06 16:03:13 -05006# ================================================================================
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18# ============LICENSE_END=========================================================
Jakub Latusekdf233a82020-10-21 13:36:29 +020019*/}}
Jack Lucas332b5e72019-02-06 16:03:13 -050020
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020021apiVersion: apps/v1
Jack Lucas332b5e72019-02-06 16:03:13 -050022kind: Deployment
23metadata:
24 name: {{ include "common.fullname" . }}
25 namespace: {{ include "common.namespace" . }}
26 labels:
27 app: {{ include "common.name" . }}
28 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010029 release: {{ include "common.release" . }}
Jack Lucas332b5e72019-02-06 16:03:13 -050030 heritage: {{ .Release.Service }}
31spec:
32 replicas: 1
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020033 selector:
34 matchLabels:
35 app: {{ include "common.name" . }}
Jack Lucas332b5e72019-02-06 16:03:13 -050036 template:
37 metadata:
38 labels:
39 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010040 release: {{ include "common.release" . }}
Jack Lucas332b5e72019-02-06 16:03:13 -050041 spec:
42 initContainers:
43 - name: {{ include "common.name" . }}-readiness
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +010044 image: {{ include "repositoryGenerator.image.readiness" . }}
Jack Lucas332b5e72019-02-06 16:03:13 -050045 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
46 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020047 - /app/ready.py
Jack Lucas332b5e72019-02-06 16:03:13 -050048 args:
49 - --container-name
50 - dcae-cloudify-manager
51 - --container-name
52 - consul-server
53 - --container-name
54 - dcae-inventory-api
55 - "-t"
56 - "45"
57 env:
58 - name: NAMESPACE
59 valueFrom:
60 fieldRef:
61 apiVersion: v1
62 fieldPath: metadata.namespace
63 - name: init-tls
64 env:
65 - name: POD_IP
66 valueFrom:
67 fieldRef:
68 apiVersion: v1
69 fieldPath: status.podIP
Jack Lucasc70bc7e2019-09-23 09:02:31 -040070 - name: aaf_locator_fqdn
71 value: dcae
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +010072 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.tlsImage }}
Jack Lucas332b5e72019-02-06 16:03:13 -050073 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
74 resources: {}
75 volumeMounts:
Jack Lucasc70bc7e2019-09-23 09:02:31 -040076 - mountPath: /opt/app/osaaf
Jack Lucas332b5e72019-02-06 16:03:13 -050077 name: tls-info
78 - name: init-consul
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +010079 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.consulLoaderImage }}
Jack Lucas332b5e72019-02-06 16:03:13 -050080 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 args:
82 - --service
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000083 - "cloudify_manager|dcae-cloudify-manager.{{ include "common.namespace" . }}|443"
Jack Lucas332b5e72019-02-06 16:03:13 -050084 - --service
85 - "inventory|inventory.{{ include "common.namespace" . }}|8080"
86 - --key
87 - deployment_handler|/dhconfig/config.json
88 resources: {}
89 volumeMounts:
90 - mountPath: /dhconfig
91 name: dh-config
92 containers:
93 - name: {{ include "common.name" . }}
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +010094 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Jack Lucas332b5e72019-02-06 16:03:13 -050095 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
96 resources:
97{{ include "common.resources" . | indent 12 }}
98 ports:
99 - containerPort: {{ .Values.service.internalPort }}
100 # disable liveness probe when breakpoints set in debugger
101 # so K8s doesn't restart unresponsive container
102 {{- if eq .Values.liveness.enabled true }}
103 livenessProbe:
104 tcpSocket:
105 port: {{ .Values.service.internalPort }}
106 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
107 periodSeconds: {{ .Values.liveness.periodSeconds }}
108 {{ end }}
109 readinessProbe:
110 httpGet:
111 path: {{ .Values.readiness.path }}
112 port: {{ .Values.service.internalPort }}
113 scheme: {{ .Values.readiness.scheme }}
114 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
115 periodSeconds: {{ .Values.readiness.periodSeconds }}
116 volumeMounts:
117 - mountPath: /opt/app/dh/log
118 name: component-log
119 - mountPath: /opt/app/dh/etc/cert/
120 name: tls-info
marcinrzepeckiwroc9a05dd22020-08-11 11:24:13 +0200121 - mountPath: /opt/app/dh/etc/
122 name: log4js-conf
Jack Lucas332b5e72019-02-06 16:03:13 -0500123 env:
124 - name: CONSUL_HOST
125 value: consul-server.{{ include "common.namespace" . }}
126 - name: CLOUDIFY_USER
127 value: admin
128 - name: CLOUDIFY_PASSWORD
Schmalzried, Terry (ts862m)12db7892020-08-21 20:42:33 -0400129 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cm-pass" "key" "password") | indent 14 }}
Jack Lucas332b5e72019-02-06 16:03:13 -0500130 - name: CONFIG_BINDING_SERVICE
131 value: config-binding-service
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +0000132 - name: NODE_EXTRA_CA_CERTS
133 value: /opt/app/dh/etc/cert/cacert.pem
Jack Lucas332b5e72019-02-06 16:03:13 -0500134 - name: POD_IP
135 valueFrom:
136 fieldRef:
137 apiVersion: v1
138 fieldPath: status.podIP
139 - name: {{ include "common.name" . }}-filebeat
140 env:
141 - name: POD_IP
142 valueFrom:
143 fieldRef:
144 apiVersion: v1
145 fieldPath: status.podIP
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +0100146 image: {{ include "repositoryGenerator.image.logging" . }}
Jack Lucas332b5e72019-02-06 16:03:13 -0500147 imagePullPolicy: IfNotPresent
148 resources: {}
149 volumeMounts:
150 - mountPath: /var/log/onap/deployment-handler
151 name: component-log
152 - mountPath: /usr/share/filebeat/data
153 name: filebeat-data
154 - mountPath: /usr/share/filebeat/filebeat.yml
155 name: filebeat-conf
156 subPath: filebeat.yml
157 volumes:
158 - emptyDir: {}
159 name: component-log
160 - emptyDir: {}
161 name: filebeat-data
162 - configMap:
163 defaultMode: 420
164 name: {{ include "common.fullname" . }}-filebeat-configmap
165 name: filebeat-conf
166 - emptyDir: {}
167 name: tls-info
168 - configMap:
169 defaultMode: 422
170 name: {{ include "common.fullname" . }}-configmap
171 name: dh-config
marcinrzepeckiwroc9a05dd22020-08-11 11:24:13 +0200172 - configMap:
173 defaultMode: 420
174 name: {{include "common.fullname" . }}-log4js-configmap
175 name: log4js-conf
Jack Lucas332b5e72019-02-06 16:03:13 -0500176 imagePullSecrets:
177 - name: "{{ include "common.namespace" . }}-docker-registry-key"