blob: b9c90f2681a89cb0b10f00e056c3917ce3e1a401 [file] [log] [blame]
Mike Elliott13fed112018-02-28 08:33:33 -05001apiVersion: extensions/v1beta1
2kind: Deployment
3metadata:
4 name: {{ include "common.fullname" . }}
5 namespace: {{ include "common.namespace" . }}
6 labels:
7 app: {{ include "common.name" . }}
8 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
9 release: {{ .Release.Name }}
10 heritage: {{ .Release.Service }}
11spec:
12 replicas: {{ .Values.replicaCount }}
13 template:
14 metadata:
15 labels:
16 app: {{ include "common.name" . }}
17 release: {{ .Release.Name }}
18 spec:
19 initContainers:
20 - command:
21 - /root/ready.py
22 args:
23 - --container-name
jmac4f76af42018-03-28 20:36:47 +000024 - {{ .Values.config.dbPodName }}
Mike Elliott13fed112018-02-28 08:33:33 -050025 env:
26 - name: NAMESPACE
27 valueFrom:
28 fieldRef:
29 apiVersion: v1
30 fieldPath: metadata.namespace
31 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
32 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
33 name: {{ include "common.name" . }}-readiness
34 containers:
35 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000036 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Mike Elliott13fed112018-02-28 08:33:33 -050037 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
jmac4f76af42018-03-28 20:36:47 +000038 command: ["/bin/bash"]
39 args: ["-c", "cd /opt/onap/ccsdk/dgbuilder/ && ./start.sh sdnc1.0 && wait"]
Mike Elliott13fed112018-02-28 08:33:33 -050040 ports:
41 - containerPort: {{ .Values.service.internalPort }}
42 readinessProbe:
43 tcpSocket:
44 port: {{ .Values.service.internalPort }}
45 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
46 periodSeconds: {{ .Values.readiness.periodSeconds }}
47 env:
48 - name: MYSQL_ROOT_PASSWORD
49 valueFrom:
50 secretKeyRef:
51 name: {{ template "common.fullname" . }}
52 key: db-root-password
53 - name: SDNC_CONFIG_DIR
54 value: /opt/onap/sdnc/data/properties
55 volumeMounts:
56 - mountPath: /etc/localtime
57 name: localtime
58 readOnly: true
59 - name: config
60 mountPath: /opt/app/application.properties
61 subPath: application.properties
62 - name: config
63 mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/conf/svclogic.properties
64 subPath: svclogic.properties
65 - name: config
66 mountPath: /opt/onap/sdnc/dgbuilder/svclogic/svclogic.properties
67 subPath: svclogic.properties
68 - name: scripts
69 mountPath: /opt/onap/sdnc/dgbuilder/createReleaseDir.sh
70 subPath: createReleaseDir.sh
71 - name: scripts
72 mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/customSettings.js
73 subPath: customSettings.js
74 resources:
75{{ toYaml .Values.resources | indent 12 }}
76 {{- if .Values.nodeSelector }}
77 nodeSelector:
78{{ toYaml .Values.nodeSelector | indent 10 }}
79 {{- end -}}
80 {{- if .Values.affinity }}
81 affinity:
82{{ toYaml .Values.affinity | indent 10 }}
83 {{- end }}
84 volumes:
85 - name: localtime
86 hostPath:
87 path: /etc/localtime
88 - name: config
89 configMap:
90 name: {{ include "common.fullname" . }}-config
91 - name: scripts
92 configMap:
93 name: {{ include "common.fullname" . }}-scripts
94 defaultMode: 0755
95 imagePullSecrets:
96 - name: "{{ include "common.namespace" . }}-docker-registry-key"