blob: 9d67d9f3c2f843157b25b427c9c9ed272cc015ea [file] [log] [blame]
Jack Lucas331debf2019-05-14 17:31:34 -04001#============LICENSE_START========================================================
2# ================================================================================
3# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
4# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# ============LICENSE_END=========================================================
17
18apiVersion: extensions/v1beta1
19kind: Deployment
20metadata:
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
23 labels:
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ .Release.Name }}
27 heritage: {{ .Release.Service }}
28spec:
29 replicas: 1
30 template:
31 metadata:
32 labels:
33 app: {{ include "common.name" . }}
34 release: {{ .Release.Name }}
35 spec:
36
37 containers:
38 - name: {{ include "common.name" . }}
39 image: "{{ .Values.repository }}/{{ .Values.image }}"
40 imagePullPolicy: {{ .Values.pullPolicy }}
41 resources:
42{{ include "common.resources" . | indent 12 }}
43 ports:
44 - containerPort: {{ .Values.service.internalPort }}
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 httpGet:
56 path: {{ .Values.readiness.path }}
57 port: {{ .Values.service.internalPort }}
58 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
59 periodSeconds: {{ .Values.readiness.periodSeconds }}
60 volumeMounts:
61 - name: {{ include "common.fullname" . }}-config
62 mountPath: /etc/nginx/nginx.conf
63 subPath: nginx.conf
64 - name: {{ include "common.fullname" . }}-proxies
65 mountPath: /etc/nginx/proxies.d
66
67 volumes:
68 - name: {{ include "common.fullname" . }}-config
69 configMap:
70 name: {{ include "common.fullname" . }}-configmap
71 - name: {{ include "common.fullname" . }}-proxies
72 configMap:
73 name: {{ include "common.fullname" . }}-proxies-configmap
74 imagePullSecrets:
75 - name: "{{ include "common.namespace" . }}-docker-registry-key"