vaibhavjayas | ea9aee0 | 2018-08-31 06:22:26 +0000 | [diff] [blame] | 1 | # 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 Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 15 | apiVersion: extensions/v1beta1 |
| 16 | kind: Deployment |
| 17 | metadata: |
| 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 }} |
| 25 | spec: |
| 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 |
jmac | 4f76af4 | 2018-03-28 20:36:47 +0000 | [diff] [blame] | 38 | - {{ .Values.config.dbPodName }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 39 | 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" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 50 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 51 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
jmac | 4f76af4 | 2018-03-28 20:36:47 +0000 | [diff] [blame] | 52 | command: ["/bin/bash"] |
| 53 | args: ["-c", "cd /opt/onap/ccsdk/dgbuilder/ && ./start.sh sdnc1.0 && wait"] |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 54 | 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 |
afenner | 291d787 | 2018-05-23 14:19:55 +0000 | [diff] [blame] | 77 | mountPath: /opt/onap/ccsdk/dgbuilder/releases/sdnc1.0/conf/svclogic.properties |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 78 | subPath: svclogic.properties |
| 79 | - name: config |
afenner | 291d787 | 2018-05-23 14:19:55 +0000 | [diff] [blame] | 80 | mountPath: /opt/onap/ccsdk/dgbuilder/svclogic/svclogic.properties |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 81 | subPath: svclogic.properties |
| 82 | - name: scripts |
afenner | 291d787 | 2018-05-23 14:19:55 +0000 | [diff] [blame] | 83 | mountPath: /opt/onap/ccsdk/dgbuilder/createReleaseDir.sh |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 84 | subPath: createReleaseDir.sh |
| 85 | - name: scripts |
afenner | 291d787 | 2018-05-23 14:19:55 +0000 | [diff] [blame] | 86 | mountPath: /opt/onap/ccsdk/dgbuilder/releases/sdnc1.0/customSettings.js |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 87 | subPath: customSettings.js |
| 88 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 89 | {{ include "common.resources" . | indent 12 }} |
Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 90 | {{- 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" |