toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, AT&T, Bell Canada |
| 2 | # Modifications Copyright © 2018 ZTE |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [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 | |
| 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: |
| 35 | - name: {{ include "common.name" . }}-job-completion |
| 36 | image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" |
| 37 | imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}" |
| 38 | command: |
| 39 | - /root/job_complete.py |
| 40 | args: |
| 41 | - --job-name |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 42 | - {{ include "common.fullname" . }}-workflow-init |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 43 | env: |
| 44 | - name: NAMESPACE |
| 45 | valueFrom: |
| 46 | fieldRef: |
| 47 | apiVersion: v1 |
| 48 | fieldPath: metadata.namespace |
| 49 | containers: |
| 50 | - name: {{ include "common.name" . }} |
| 51 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
| 52 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 53 | ports: |
| 54 | - containerPort: {{ .Values.service.internalPort }} |
| 55 | # disable liveness probe when breakpoints set in debugger |
| 56 | # so K8s doesn't restart unresponsive container |
| 57 | {{ if .Values.liveness.enabled }} |
| 58 | livenessProbe: |
| 59 | tcpSocket: |
| 60 | port: {{ .Values.service.internalPort }} |
| 61 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 62 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 63 | {{ end }} |
| 64 | readinessProbe: |
| 65 | tcpSocket: |
| 66 | port: {{ .Values.service.internalPort }} |
| 67 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 68 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 69 | env: |
| 70 | - name: JAVA_OPTIONS |
| 71 | value: {{ .Values.config.javaOptions }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 72 | - name: CS_HOSTS |
| 73 | value: "{{ .Values.config.cassandraHosts }}" |
| 74 | - name: CS_PORT |
| 75 | value: "{{ .Values.config.cassandraClientPort }}" |
| 76 | - name: CS_USER |
| 77 | valueFrom: |
| 78 | secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: sdc_user} |
| 79 | - name: CS_PASSWORD |
| 80 | valueFrom: |
| 81 | secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: sdc_password} |
| 82 | - name: SDC_PROTOCOL |
| 83 | value: "{{ .Values.config.sdcProtocol }}" |
| 84 | - name: SDC_ENDPOINT |
| 85 | value: "{{ .Values.config.sdcEndpoint }}" |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 86 | imagePullSecrets: |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 87 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |