blob: 15e574f5114529122ddc0179ea2f6603c2c814a7 [file] [log] [blame]
kje371d042018-03-27 15:50:39 +03001# 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
15apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
25spec:
26 replicas: {{ .Values.replicaCount }}
27 selector:
28 matchLabels:
29 app: {{ include "common.name" . }}
30 template:
31 metadata:
32 labels:
33 app: {{ include "common.name" . }}
34 name: {{ .Release.Name }}
35 spec:
36 hostname: {{ include "common.name" . }}
37 containers:
38 - args:
Kiran Kaminenicb382382018-03-21 14:58:11 -070039 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
kje371d042018-03-27 15:50:39 +030040 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
41 name: {{ include "common.name" . }}
42 volumeMounts:
43 - mountPath: /data
44 name: aaf-cs-data
45 # disable liveness probe when breakpoints set in debugger
46 # so K8s doesn't restart unresponsive container
47 {{- if eq .Values.liveness.enabled true }}
48 livenessProbe:
49 tcpSocket:
50 port: {{ .Values.service.internalPort }}
51 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
52 periodSeconds: {{ .Values.liveness.periodSeconds }}
53 {{ end -}}
54 readinessProbe:
55 tcpSocket:
56 port: {{ .Values.service.internalPort }}
57 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
58 periodSeconds: {{ .Values.readiness.periodSeconds }}
59 resources:
60{{ toYaml .Values.resources | indent 12 }}
61 {{- if .Values.nodeSelector }}
62 nodeSelector:
63{{ toYaml .Values.nodeSelector | indent 10 }}
64 {{- end -}}
65 {{- if .Values.affinity }}
66 affinity:
67{{ toYaml .Values.affinity | indent 10 }}
68 {{- end }}
69
70 volumes:
71 - name: aaf-cs-data
72 secret:
73 secretName: {{ include "common.fullname" . }}
74 imagePullSecrets:
75 - name: "{{ include "common.namespace" . }}-docker-registry-key"