blob: 9514f41b865cfdead4363f1caf541468da381b9f [file] [log] [blame]
Jakub Latusekdf233a82020-10-21 13:36:29 +02001{{/*
Jack Lucasb92fe602018-04-20 18:51:34 +00002#============LICENSE_START========================================================
3# ================================================================================
Jack Lucas8c3463e2020-06-12 18:36:55 -04004# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.
Durgpal7ad40692018-08-03 07:28:36 +00005# Modifications Copyright © 2018 Amdocs, Bell Canada
Jack Lucasb92fe602018-04-20 18:51:34 +00006# ================================================================================
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18# ============LICENSE_END=========================================================
Jakub Latusekdf233a82020-10-21 13:36:29 +020019*/}}
Jack Lucasb92fe602018-04-20 18:51:34 +000020
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020021apiVersion: apps/v1
Jack Lucasb92fe602018-04-20 18:51:34 +000022kind: Deployment
23metadata:
24 name: {{ include "common.fullname" . }}
25 namespace: {{ include "common.namespace" . }}
26 labels:
27 app: {{ include "common.name" . }}
28 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010029 release: {{ include "common.release" . }}
Jack Lucasb92fe602018-04-20 18:51:34 +000030 heritage: {{ .Release.Service }}
31spec:
32 replicas: 1
Krzysztof Kuzmickiaef70072020-07-24 14:47:43 +020033 selector:
34 matchLabels:
35 app: {{ include "common.name" . }}
Jack Lucasb92fe602018-04-20 18:51:34 +000036 template:
37 metadata:
38 labels:
39 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010040 release: {{ include "common.release" . }}
Jack Lucasb92fe602018-04-20 18:51:34 +000041 spec:
42 containers:
43 - name: {{ include "common.name" . }}
Sylvain Desbureauxcad63e52020-11-21 22:17:40 +010044 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Jack Lucasb92fe602018-04-20 18:51:34 +000045 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
vaibhav_16decdb582fa2018-09-20 12:32:47 +000046 resources:
47{{ include "common.resources" . | indent 12 }}
Jack Lucasb92fe602018-04-20 18:51:34 +000048 ports:
49 - containerPort: {{ .Values.service.internalPort }}
50 # disable liveness probe when breakpoints set in debugger
51 # so K8s doesn't restart unresponsive container
52 {{- if eq .Values.liveness.enabled true }}
53 livenessProbe:
54 tcpSocket:
55 port: {{ .Values.service.internalPort }}
56 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
57 periodSeconds: {{ .Values.liveness.periodSeconds }}
58 {{ end -}}
59 readinessProbe:
60 tcpSocket:
61 port: {{ .Values.service.internalPort }}
62 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
63 periodSeconds: {{ .Values.readiness.periodSeconds }}
Jack Lucas8c3463e2020-06-12 18:36:55 -040064 volumeMounts:
65 - mountPath: /opt/app/expected-components.json
66 subPath: expected-components.json
67 name: {{ include "common.fullname" .}}-expected-components
Jack Lucasb92fe602018-04-20 18:51:34 +000068 env:
69 - name: DCAE_NAMESPACE
70 value: {{ .Values.dcae_ns }}
71 - name: ONAP_NAMESPACE
72 value: {{ include "common.namespace" . }}
73 - name: HELM_RELEASE
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010074 value: {{ include "common.release" . }}
Jack Lucas8c3463e2020-06-12 18:36:55 -040075 - name: DEPLOY_LABEL
76 value: cfydeployment
77 volumes:
78 - name: {{ include "common.fullname" . }}-expected-components
79 configMap:
80 name: {{ include "common.release" . }}-dcae-expected-components
Jack Lucasb92fe602018-04-20 18:51:34 +000081 imagePullSecrets:
82 - name: "{{ include "common.namespace" . }}-docker-registry-key"