blob: 353c2314aceb8d73eff31ff4605ff47e1e747f91 [file] [log] [blame]
vaibhavjayasea9aee02018-08-31 06:22:26 +00001# Copyright © 2018 AT&T, Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Mike Elliott13fed112018-02-28 08:33:33 -050015apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
25spec:
26 replicas: {{ .Values.replicaCount }}
27 template:
28 metadata:
29 labels:
30 app: {{ include "common.name" . }}
31 release: {{ .Release.Name }}
32 spec:
33 initContainers:
34 - command:
35 - /root/ready.py
36 args:
37 - --container-name
jmac4f76af42018-03-28 20:36:47 +000038 - {{ .Values.config.dbPodName }}
Mike Elliott13fed112018-02-28 08:33:33 -050039 env:
40 - name: NAMESPACE
41 valueFrom:
42 fieldRef:
43 apiVersion: v1
44 fieldPath: metadata.namespace
45 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 name: {{ include "common.name" . }}-readiness
48 containers:
49 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000050 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Mike Elliott13fed112018-02-28 08:33:33 -050051 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
jmac4f76af42018-03-28 20:36:47 +000052 command: ["/bin/bash"]
53 args: ["-c", "cd /opt/onap/ccsdk/dgbuilder/ && ./start.sh sdnc1.0 && wait"]
Mike Elliott13fed112018-02-28 08:33:33 -050054 ports:
55 - containerPort: {{ .Values.service.internalPort }}
56 readinessProbe:
57 tcpSocket:
58 port: {{ .Values.service.internalPort }}
59 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
60 periodSeconds: {{ .Values.readiness.periodSeconds }}
61 env:
62 - name: MYSQL_ROOT_PASSWORD
63 valueFrom:
64 secretKeyRef:
65 name: {{ template "common.fullname" . }}
66 key: db-root-password
67 - name: SDNC_CONFIG_DIR
68 value: /opt/onap/sdnc/data/properties
69 volumeMounts:
70 - mountPath: /etc/localtime
71 name: localtime
72 readOnly: true
73 - name: config
74 mountPath: /opt/app/application.properties
75 subPath: application.properties
76 - name: config
afenner291d7872018-05-23 14:19:55 +000077 mountPath: /opt/onap/ccsdk/dgbuilder/releases/sdnc1.0/conf/svclogic.properties
Mike Elliott13fed112018-02-28 08:33:33 -050078 subPath: svclogic.properties
79 - name: config
afenner291d7872018-05-23 14:19:55 +000080 mountPath: /opt/onap/ccsdk/dgbuilder/svclogic/svclogic.properties
Mike Elliott13fed112018-02-28 08:33:33 -050081 subPath: svclogic.properties
82 - name: scripts
afenner291d7872018-05-23 14:19:55 +000083 mountPath: /opt/onap/ccsdk/dgbuilder/createReleaseDir.sh
Mike Elliott13fed112018-02-28 08:33:33 -050084 subPath: createReleaseDir.sh
85 - name: scripts
afenner291d7872018-05-23 14:19:55 +000086 mountPath: /opt/onap/ccsdk/dgbuilder/releases/sdnc1.0/customSettings.js
Mike Elliott13fed112018-02-28 08:33:33 -050087 subPath: customSettings.js
88 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000089{{ include "common.resources" . | indent 12 }}
Mike Elliott13fed112018-02-28 08:33:33 -050090 {{- if .Values.nodeSelector }}
91 nodeSelector:
92{{ toYaml .Values.nodeSelector | indent 10 }}
93 {{- end -}}
94 {{- if .Values.affinity }}
95 affinity:
96{{ toYaml .Values.affinity | indent 10 }}
97 {{- end }}
98 volumes:
99 - name: localtime
100 hostPath:
101 path: /etc/localtime
102 - name: config
103 configMap:
104 name: {{ include "common.fullname" . }}-config
105 - name: scripts
106 configMap:
107 name: {{ include "common.fullname" . }}-scripts
108 defaultMode: 0755
109 imagePullSecrets:
110 - name: "{{ include "common.namespace" . }}-docker-registry-key"