blob: a926fb396b56bd6220a099ecf7970b18735a266b [file] [log] [blame]
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +00001#============LICENSE_START========================================================
2# ================================================================================
3# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
4# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# ============LICENSE_END=========================================================
17
18apiVersion: extensions/v1beta1
19kind: Deployment
20metadata:
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
23 labels:
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010026 release: {{ include "common.release" . }}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000027 heritage: {{ .Release.Service }}
28spec:
29 replicas: 1
30 template:
31 metadata:
32 labels:
33 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010034 release: {{ include "common.release" . }}
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000035 spec:
36 initContainers:
37 - name: {{ include "common.name" . }}-readiness
38 image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
39 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
40 command:
41 - /root/ready.py
42 args:
43 - --container-name
44 - dcae-cloudify-manager
45 - --container-name
46 - consul-server
47 - --container-name
48 - dcae-inventory-api
49 - --container-name
50 - dcae-deployment-handler
51 - --container-name
52 - {{ .Values.postgres.nameOverride }}
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
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000070 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
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +000075 name: tls-info
76 containers:
77 - name: {{ include "common.name" . }}
78 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
79 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
80 resources:
81{{ include "common.resources" . | indent 12 }}
82 ports:
83 - containerPort: {{ .Values.service.internalPort }}
84 protocol: TCP
85 # disable liveness probe when breakpoints set in debugger
86 # so K8s doesn't restart unresponsive container
87 {{- if eq .Values.liveness.enabled true }}
88 livenessProbe:
89 tcpSocket:
90 port: {{ .Values.service.internalPort }}
91 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
92 periodSeconds: {{ .Values.liveness.periodSeconds }}
93 {{ end }}
94 readinessProbe:
95 httpGet:
96 path: {{ .Values.readiness.path }}
97 port: {{ .Values.service.internalPort }}
98 scheme: {{ .Values.readiness.scheme }}
99 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
100 periodSeconds: {{ .Values.readiness.periodSeconds }}
101 failureThreshold: 1
102 successThreshold: 1
103 timeoutSeconds: 1
104 volumeMounts:
105 - mountPath: /usr/local/share/ca-certificates/
106 name: tls-info
Vijay Venkatesh Kumar694394b2020-02-20 21:50:14 +0000107 - mountPath: /opt/logs/dcae/dashboard
108 name: component-log
Vijay Venkatesh Kumara4535c92019-08-02 01:45:23 +0000109 env:
110 - name: CONSUL_HOST
111 value: consul-server.{{ include "common.namespace" . }}
112 - name: CONFIG_BINDING_SERVICE
113 value: config-binding-service
114 - name: inventory_url
115 value: {{ .Values.config.inventory_url }}
116 - name: postgres_port
117 value: "{{ .Values.postgres.config.pgPort }}"
118 - name: cloudify_password
119 value: admin
120 - name: dhandler_url
121 value: {{ .Values.config.dhandler_url }}
122 - name: cfy_url
123 value: {{ .Values.config.cfy_url }}
124 - name: cloudify_user
125 value: admin
126 - name: consul_url
127 value: http://consul-server-ui:8500
128 - name: postgres_user_dashboard
129 value: {{ .Values.postgres.config.pgUserName }}
130 - name: postgres_db_name
131 value: {{ .Values.postgres.config.pgDatabase }}
132 - name: postgres_password_dashboard
133 value: {{ .Values.postgres.config.pgUserPassword }}
134 - name: postgres_ip
135 value: {{ .Values.postgres.service.name2 }}
136 - name: POD_IP
137 valueFrom:
138 fieldRef:
139 apiVersion: v1
140 fieldPath: status.podIP
141 - name: {{ include "common.name" . }}-filebeat
142 env:
143 - name: POD_IP
144 valueFrom:
145 fieldRef:
146 apiVersion: v1
147 fieldPath: status.podIP
148 image: {{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}
149 imagePullPolicy: IfNotPresent
150 resources: {}
151 volumeMounts:
152 - mountPath: /var/log/onap/dashboard
153 name: component-log
154 - mountPath: /usr/share/filebeat/data
155 name: filebeat-data
156 - mountPath: /usr/share/filebeat/filebeat.yml
157 name: filebeat-conf
158 subPath: filebeat.yml
159 volumes:
160 - emptyDir: {}
161 name: component-log
162 - emptyDir: {}
163 name: filebeat-data
164 - configMap:
165 defaultMode: 420
166 name: {{ include "common.fullname" . }}-filebeat-configmap
167 name: filebeat-conf
168 - emptyDir: {}
169 name: tls-info
170 imagePullSecrets:
171 - name: "{{ include "common.namespace" . }}-docker-registry-key"
172