blob: 328e058f5cdf3d7d13ca609fa1a886001516cf61 [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
afenner291d7872018-05-23 14:19:55 +000063 mountPath: /opt/onap/ccsdk/dgbuilder/releases/sdnc1.0/conf/svclogic.properties
Mike Elliott13fed112018-02-28 08:33:33 -050064 subPath: svclogic.properties
65 - name: config
afenner291d7872018-05-23 14:19:55 +000066 mountPath: /opt/onap/ccsdk/dgbuilder/svclogic/svclogic.properties
Mike Elliott13fed112018-02-28 08:33:33 -050067 subPath: svclogic.properties
68 - name: scripts
afenner291d7872018-05-23 14:19:55 +000069 mountPath: /opt/onap/ccsdk/dgbuilder/createReleaseDir.sh
Mike Elliott13fed112018-02-28 08:33:33 -050070 subPath: createReleaseDir.sh
71 - name: scripts
afenner291d7872018-05-23 14:19:55 +000072 mountPath: /opt/onap/ccsdk/dgbuilder/releases/sdnc1.0/customSettings.js
Mike Elliott13fed112018-02-28 08:33:33 -050073 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"