blob: 9027e851d2c98eb88cc303242a6a2464245b3c09 [file] [log] [blame]
Jakub Latusekdf233a82020-10-21 13:36:29 +02001{{/*
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +00002#============LICENSE_START========================================================
3# ================================================================================
Schmalzried, Terry (ts862m)12db7892020-08-21 20:42:33 -04004# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +00005# ================================================================================
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=========================================================
Jakub Latusekdf233a82020-10-21 13:36:29 +020018*/}}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000019
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020020apiVersion: apps/v1
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000021kind: Deployment
22metadata:
23 name: {{ include "common.fullname" . }}
24 namespace: {{ include "common.namespace" . }}
25 labels:
26 app: {{ include "common.name" . }}
27 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010028 release: {{ include "common.release" . }}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000029 heritage: {{ .Release.Service }}
30spec:
31 replicas: 1
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020032 selector:
33 matchLabels:
34 app: {{ include "common.name" . }}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000035 template:
36 metadata:
37 labels:
38 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010039 release: {{ include "common.release" . }}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000040 spec:
41 initContainers:
42 - name: {{ include "common.name" . }}-readiness
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020043 image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000044 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
45 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020046 - /app/ready.py
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000047 args:
48 - --container-name
49 - dcae-cloudify-manager
50 - --container-name
51 - consul-server
52 - --container-name
53 - dcae-inventory-api
54 - --container-name
55 - dcae-deployment-handler
56 - --container-name
57 - {{ .Values.postgres.nameOverride }}
58 - "-t"
59 - "45"
60 env:
61 - name: NAMESPACE
62 valueFrom:
63 fieldRef:
64 apiVersion: v1
65 fieldPath: metadata.namespace
66 - name: init-tls
67 env:
68 - name: POD_IP
69 valueFrom:
70 fieldRef:
71 apiVersion: v1
72 fieldPath: status.podIP
Jack Lucasc70bc7e2019-09-23 09:02:31 -040073 - name: aaf_locator_fqdn
74 value: dcae
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000075 image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }}
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 resources: {}
78 volumeMounts:
Jack Lucasc70bc7e2019-09-23 09:02:31 -040079 - mountPath: /opt/app/osaaf
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000080 name: tls-info
81 containers:
82 - name: {{ include "common.name" . }}
83 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
84 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
85 resources:
86{{ include "common.resources" . | indent 12 }}
87 ports:
88 - containerPort: {{ .Values.service.internalPort }}
89 protocol: TCP
90 # disable liveness probe when breakpoints set in debugger
91 # so K8s doesn't restart unresponsive container
92 {{- 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 httpGet:
101 path: {{ .Values.readiness.path }}
102 port: {{ .Values.service.internalPort }}
103 scheme: {{ .Values.readiness.scheme }}
104 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
105 periodSeconds: {{ .Values.readiness.periodSeconds }}
106 failureThreshold: 1
107 successThreshold: 1
108 timeoutSeconds: 1
109 volumeMounts:
vv770d2ec85e32020-09-21 20:16:16 +0000110 - mountPath: /opt/app/osaaf/
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +0000111 name: tls-info
Vijay Venkatesh Kumar694394b2020-02-20 21:50:14 +0000112 - mountPath: /opt/logs/dcae/dashboard
113 name: component-log
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +0000114 env:
115 - name: CONSUL_HOST
116 value: consul-server.{{ include "common.namespace" . }}
117 - name: CONFIG_BINDING_SERVICE
118 value: config-binding-service
119 - name: inventory_url
120 value: {{ .Values.config.inventory_url }}
121 - name: postgres_port
122 value: "{{ .Values.postgres.config.pgPort }}"
123 - name: cloudify_password
Schmalzried, Terry (ts862m)12db7892020-08-21 20:42:33 -0400124 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cm-pass" "key" "password") | indent 14 }}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +0000125 - name: dhandler_url
126 value: {{ .Values.config.dhandler_url }}
127 - name: cfy_url
128 value: {{ .Values.config.cfy_url }}
129 - name: cloudify_user
130 value: admin
131 - name: consul_url
132 value: http://consul-server-ui:8500
133 - name: postgres_user_dashboard
Krzysztof Opasiakf2816a02020-05-05 11:45:03 +0200134 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 14 }}
135 - name: postgres_password_dashboard
136 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 14 }}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +0000137 - name: postgres_db_name
138 value: {{ .Values.postgres.config.pgDatabase }}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +0000139 - name: postgres_ip
140 value: {{ .Values.postgres.service.name2 }}
141 - name: POD_IP
142 valueFrom:
143 fieldRef:
144 apiVersion: v1
145 fieldPath: status.podIP
146 - name: {{ include "common.name" . }}-filebeat
147 env:
148 - name: POD_IP
149 valueFrom:
150 fieldRef:
151 apiVersion: v1
152 fieldPath: status.podIP
153 image: {{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}
154 imagePullPolicy: IfNotPresent
155 resources: {}
156 volumeMounts:
157 - mountPath: /var/log/onap/dashboard
158 name: component-log
159 - mountPath: /usr/share/filebeat/data
160 name: filebeat-data
161 - mountPath: /usr/share/filebeat/filebeat.yml
162 name: filebeat-conf
163 subPath: filebeat.yml
164 volumes:
165 - emptyDir: {}
166 name: component-log
167 - emptyDir: {}
168 name: filebeat-data
169 - configMap:
170 defaultMode: 420
171 name: {{ include "common.fullname" . }}-filebeat-configmap
172 name: filebeat-conf
173 - emptyDir: {}
174 name: tls-info
175 imagePullSecrets:
176 - name: "{{ include "common.namespace" . }}-docker-registry-key"