Mandeep Khinda | b1f9efe | 2018-03-28 19:01:55 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 AT&T, ZTE |
Mandeep Khinda | b1f9efe | 2018-03-28 19:01:55 +0000 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: {{ include "common.fullname" . }} |
| 20 | namespace: {{ include "common.namespace" . }} |
| 21 | labels: |
| 22 | app: {{ include "common.name" . }} |
| 23 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 24 | release: {{ .Release.Name }} |
| 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
| 27 | replicas: {{ .Values.replicaCount }} |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: {{ include "common.name" . }} |
| 32 | release: {{ .Release.Name }} |
| 33 | spec: |
| 34 | initContainers: |
Mike Elliott | 6482f50 | 2018-04-30 15:02:43 -0400 | [diff] [blame] | 35 | - name: {{ include "common.name" . }}-job-completion |
| 36 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 37 | imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}" |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 38 | command: |
Mike Elliott | 6482f50 | 2018-04-30 15:02:43 -0400 | [diff] [blame] | 39 | - /root/job_complete.py |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 40 | args: |
Mike Elliott | 6482f50 | 2018-04-30 15:02:43 -0400 | [diff] [blame] | 41 | - --job-name |
| 42 | - {{ .Release.Name }}-sdc-es-config-elasticsearch |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 43 | env: |
| 44 | - name: NAMESPACE |
| 45 | valueFrom: |
| 46 | fieldRef: |
| 47 | apiVersion: v1 |
| 48 | fieldPath: metadata.namespace |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 49 | containers: |
| 50 | - name: {{ include "common.name" . }} |
Mandeep Khinda | 51a8b1b | 2018-04-24 20:05:32 +0000 | [diff] [blame] | 51 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 52 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 53 | ports: |
| 54 | - containerPort: {{ .Values.service.internalPort }} |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 55 | {{ if eq .Values.liveness.enabled true }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 56 | livenessProbe: |
| 57 | tcpSocket: |
| 58 | port: {{ .Values.service.internalPort }} |
| 59 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 60 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 61 | {{ end }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 62 | readinessProbe: |
| 63 | tcpSocket: |
| 64 | port: {{ .Values.service.internalPort }} |
| 65 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 66 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 67 | env: |
| 68 | - name: ENVNAME |
| 69 | value: {{ .Values.global.env.name }} |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 70 | - name: NODE_OPTIONS |
| 71 | value: {{ .Values.config.nodeOptions }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 72 | - name: HOST_IP |
| 73 | valueFrom: |
| 74 | fieldRef: |
| 75 | fieldPath: status.podIP |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 76 | volumeMounts: |
| 77 | - name: {{ include "common.fullname" . }}-environments |
| 78 | mountPath: /root/chef-solo/environments/ |
| 79 | - name: {{ include "common.fullname" . }}-localtime |
| 80 | mountPath: /etc/localtime |
| 81 | readOnly: true |
| 82 | resources: |
| 83 | {{ toYaml .Values.resources | indent 12 }} |
| 84 | {{- if .Values.nodeSelector }} |
| 85 | nodeSelector: |
| 86 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 87 | {{- end -}} |
| 88 | {{- if .Values.affinity }} |
| 89 | affinity: |
| 90 | {{ toYaml .Values.affinity | indent 10 }} |
| 91 | {{- end }} |
| 92 | volumes: |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 93 | - name: {{ include "common.fullname" . }}-localtime |
| 94 | hostPath: |
| 95 | path: /etc/localtime |
| 96 | - name: {{ include "common.fullname" . }}-environments |
| 97 | configMap: |
| 98 | name: {{ .Release.Name }}-sdc-environments-configmap |
| 99 | defaultMode: 0755 |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 100 | imagePullSecrets: |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 101 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |