Mike Elliott | 13fed11 | 2018-02-28 08:33:33 -0500 | [diff] [blame] | 1 | apiVersion: extensions/v1beta1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 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 }} |
| 11 | spec: |
| 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 |
| 24 | - {{ .Values.dbPodName }} |
| 25 | 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" . }} |
| 36 | image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" |
| 37 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 38 | command: |
| 39 | - /bin/bash |
| 40 | - -c |
| 41 | - cd /opt/onap/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait |
| 42 | ports: |
| 43 | - containerPort: {{ .Values.service.internalPort }} |
| 44 | readinessProbe: |
| 45 | tcpSocket: |
| 46 | port: {{ .Values.service.internalPort }} |
| 47 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 48 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 49 | env: |
| 50 | - name: MYSQL_ROOT_PASSWORD |
| 51 | valueFrom: |
| 52 | secretKeyRef: |
| 53 | name: {{ template "common.fullname" . }} |
| 54 | key: db-root-password |
| 55 | - name: SDNC_CONFIG_DIR |
| 56 | value: /opt/onap/sdnc/data/properties |
| 57 | volumeMounts: |
| 58 | - mountPath: /etc/localtime |
| 59 | name: localtime |
| 60 | readOnly: true |
| 61 | - name: config |
| 62 | mountPath: /opt/app/application.properties |
| 63 | subPath: application.properties |
| 64 | - name: config |
| 65 | mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/conf/svclogic.properties |
| 66 | subPath: svclogic.properties |
| 67 | - name: config |
| 68 | mountPath: /opt/onap/sdnc/dgbuilder/svclogic/svclogic.properties |
| 69 | subPath: svclogic.properties |
| 70 | - name: scripts |
| 71 | mountPath: /opt/onap/sdnc/dgbuilder/createReleaseDir.sh |
| 72 | subPath: createReleaseDir.sh |
| 73 | - name: scripts |
| 74 | mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/customSettings.js |
| 75 | subPath: customSettings.js |
| 76 | resources: |
| 77 | {{ toYaml .Values.resources | indent 12 }} |
| 78 | {{- if .Values.nodeSelector }} |
| 79 | nodeSelector: |
| 80 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 81 | {{- end -}} |
| 82 | {{- if .Values.affinity }} |
| 83 | affinity: |
| 84 | {{ toYaml .Values.affinity | indent 10 }} |
| 85 | {{- end }} |
| 86 | volumes: |
| 87 | - name: localtime |
| 88 | hostPath: |
| 89 | path: /etc/localtime |
| 90 | - name: config |
| 91 | configMap: |
| 92 | name: {{ include "common.fullname" . }}-config |
| 93 | - name: scripts |
| 94 | configMap: |
| 95 | name: {{ include "common.fullname" . }}-scripts |
| 96 | defaultMode: 0755 |
| 97 | imagePullSecrets: |
| 98 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |