kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 1 | # Copyright © 2017 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 | |
| 15 | apiVersion: extensions/v1beta1 |
| 16 | kind: Deployment |
| 17 | metadata: |
| 18 | labels: |
| 19 | app: {{ include "common.name" . }} |
| 20 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 21 | release: {{ .Release.Name }} |
| 22 | heritage: {{ .Release.Service }} |
| 23 | name: {{ include "common.fullname" . }} |
| 24 | namespace: {{ include "common.namespace" . }} |
| 25 | spec: |
| 26 | replicas: {{ .Values.replicaCount }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 27 | template: |
| 28 | metadata: |
| 29 | labels: |
| 30 | app: {{ include "common.name" . }} |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 31 | release: {{ .Release.Name }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 32 | spec: |
| 33 | initContainers: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 34 | - name: {{ include "common.name" . }}-job-complete |
| 35 | command: |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 36 | - /root/job_complete.py |
| 37 | args: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 38 | - --job-name |
| 39 | - {{ .Release.Name }}-create-config |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 40 | env: |
| 41 | - name: NAMESPACE |
| 42 | valueFrom: |
| 43 | fieldRef: |
| 44 | apiVersion: v1 |
| 45 | fieldPath: metadata.namespace |
| 46 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 47 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 48 | - name: {{ include "common.name" . }}-readiness |
| 49 | command: |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 50 | - /root/ready.py |
| 51 | args: |
| 52 | - --container-name |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 53 | - aaf-service |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 54 | env: |
| 55 | - name: NAMESPACE |
| 56 | valueFrom: |
| 57 | fieldRef: |
| 58 | apiVersion: v1 |
| 59 | fieldPath: metadata.namespace |
| 60 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 61 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 62 | containers: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 63 | - name: {{ include "common.name" . }} |
| 64 | command: ["/bin/bash","/opt/app/aaf/bin/locate"] |
Kiran Kamineni | 3964872 | 2018-03-21 14:58:11 -0700 | [diff] [blame] | 65 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 66 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 67 | volumeMounts: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 68 | - mountPath: "/opt/app/osaaf" |
| 69 | name: shared-config-volume |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 70 | - mountPath: /etc/localtime |
| 71 | name: localtime |
| 72 | readOnly: true |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 73 | {{- if eq .Values.liveness.enabled true }} |
| 74 | livenessProbe: |
| 75 | tcpSocket: |
| 76 | port: {{ .Values.service.internalPort }} |
| 77 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 78 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 79 | {{ end -}} |
| 80 | readinessProbe: |
| 81 | tcpSocket: |
| 82 | port: {{ .Values.service.internalPort }} |
| 83 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 84 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 85 | resources: |
Mandeep Khinda | 5e3f36a | 2018-09-24 15:25:42 +0000 | [diff] [blame] | 86 | {{ include "common.resources" . | indent 12 }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 87 | {{- if .Values.nodeSelector }} |
| 88 | nodeSelector: |
| 89 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 90 | {{- end -}} |
| 91 | {{- if .Values.affinity }} |
| 92 | affinity: |
| 93 | {{ toYaml .Values.affinity | indent 10 }} |
| 94 | {{- end }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 95 | volumes: |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 96 | - name: localtime |
| 97 | hostPath: |
| 98 | path: /etc/localtime |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 99 | - name: shared-config-volume |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 100 | {{- if .Values.global.persistence.enabled }} |
| 101 | persistentVolumeClaim: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 102 | claimName: {{ .Release.Name }}-config |
Mahendra Raghuwanshi | afb1e2a | 2018-05-03 12:15:03 +0000 | [diff] [blame] | 103 | {{- else }} |
| 104 | emptyDir: {} |
| 105 | {{- end }} |
kj | 52dfb13 | 2018-03-27 15:50:39 +0300 | [diff] [blame] | 106 | imagePullSecrets: |
Mandeep Khinda | 6dcc80d | 2018-10-09 14:47:35 +0000 | [diff] [blame] | 107 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |