blob: 8911dbc5a38b9d5988265ababaddbbe37d3156a1 [file] [log] [blame]
Mandeep Khindab1f9efe2018-03-28 19:01:55 +00001# Copyright © 2017 Amdocs, Bell Canada
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00002# Modifications Copyright © 2018 AT&T, ZTE
Mandeep Khindab1f9efe2018-03-28 19:01:55 +00003#
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 Khindaa1047f42018-03-22 02:12:15 +000016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010024 release: {{ include "common.release" . }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000025 heritage: {{ .Release.Service }}
26spec:
27 replicas: {{ .Values.replicaCount }}
28 template:
29 metadata:
30 labels:
31 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010032 release: {{ include "common.release" . }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000033 spec:
34 initContainers:
Mike Elliott6482f502018-04-30 15:02:43 -040035 - name: {{ include "common.name" . }}-job-completion
36 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
37 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
Mandeep Khindaa1047f42018-03-22 02:12:15 +000038 command:
Mike Elliott6482f502018-04-30 15:02:43 -040039 - /root/job_complete.py
Mandeep Khindaa1047f42018-03-22 02:12:15 +000040 args:
Mike Elliott6482f502018-04-30 15:02:43 -040041 - --job-name
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010042 - {{ include "common.release" . }}-sdc-es-config-elasticsearch
Mandeep Khindaa1047f42018-03-22 02:12:15 +000043 env:
44 - name: NAMESPACE
45 valueFrom:
46 fieldRef:
47 apiVersion: v1
48 fieldPath: metadata.namespace
Mandeep Khindaa1047f42018-03-22 02:12:15 +000049 containers:
50 - name: {{ include "common.name" . }}
Mandeep Khinda51a8b1b2018-04-24 20:05:32 +000051 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Mandeep Khindaa1047f42018-03-22 02:12:15 +000052 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 ports:
54 - containerPort: {{ .Values.service.internalPort }}
Mandeep Khinda403c1c12018-04-19 23:15:43 +000055 {{ if eq .Values.liveness.enabled true }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000056 livenessProbe:
57 tcpSocket:
58 port: {{ .Values.service.internalPort }}
59 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
60 periodSeconds: {{ .Values.liveness.periodSeconds }}
Mandeep Khinda403c1c12018-04-19 23:15:43 +000061 {{ end }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000062 readinessProbe:
63 tcpSocket:
64 port: {{ .Values.service.internalPort }}
65 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
66 periodSeconds: {{ .Values.readiness.periodSeconds }}
Mukula93baa82018-09-19 15:56:58 +000067 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000068{{ include "common.resources" . | indent 12 }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000069 env:
70 - name: ENVNAME
71 value: {{ .Values.global.env.name }}
Mandeep Khinda403c1c12018-04-19 23:15:43 +000072 - name: NODE_OPTIONS
73 value: {{ .Values.config.nodeOptions }}
Mandeep Khindaa1047f42018-03-22 02:12:15 +000074 - name: HOST_IP
75 valueFrom:
76 fieldRef:
77 fieldPath: status.podIP
Mandeep Khindaa1047f42018-03-22 02:12:15 +000078 volumeMounts:
79 - name: {{ include "common.fullname" . }}-environments
80 mountPath: /root/chef-solo/environments/
81 - name: {{ include "common.fullname" . }}-localtime
82 mountPath: /etc/localtime
83 readOnly: true
Mandeep Khindaa1047f42018-03-22 02:12:15 +000084 volumes:
Mandeep Khinda403c1c12018-04-19 23:15:43 +000085 - name: {{ include "common.fullname" . }}-localtime
86 hostPath:
87 path: /etc/localtime
88 - name: {{ include "common.fullname" . }}-environments
89 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010090 name: {{ include "common.release" . }}-sdc-environments-configmap
Mandeep Khinda403c1c12018-04-19 23:15:43 +000091 defaultMode: 0755
Mandeep Khindaa1047f42018-03-22 02:12:15 +000092 imagePullSecrets:
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +000093 - name: "{{ include "common.namespace" . }}-docker-registry-key"