blob: 28d974c815e1eb2ec657881542517e56da8157bc [file] [log] [blame]
Jack Lucas8c3463e2020-06-12 18:36:55 -04001#============LICENSE_START========================================================
2# ================================================================================
3# Copyright (c) 2020 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: apps/v1
19kind: Deployment
20metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
21spec:
22 selector: {{- include "common.selectors" . | nindent 4 }}
23 replicas: 1
24 template:
25 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
26 spec:
27 containers:
28 - name: {{ include "common.name" . }}
29 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
30 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
31 resources:
32{{ include "common.resources" . | indent 12 }}
33 ports: {{ include "common.containerPorts" . | nindent 10 }}
34 # disable liveness probe when breakpoints set in debugger
35 # so K8s doesn't restart unresponsive container
36 {{- if eq .Values.liveness.enabled true }}
37 livenessProbe:
38 tcpSocket:
Krzysztof Opasiak28d372a2020-09-09 13:14:27 +020039 port: {{ include "common.getPort" (dict "global" . "name" "http") }}
Jack Lucas8c3463e2020-06-12 18:36:55 -040040 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
41 periodSeconds: {{ .Values.liveness.periodSeconds }}
42 {{ end -}}
43 readinessProbe:
44 tcpSocket:
Krzysztof Opasiak28d372a2020-09-09 13:14:27 +020045 port: {{ include "common.getPort" (dict "global" . "name" "http") }}
Jack Lucas8c3463e2020-06-12 18:36:55 -040046 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
47 periodSeconds: {{ .Values.readiness.periodSeconds }}
48 volumeMounts:
49 - mountPath: /opt/app/expected-components.json
50 subPath: expected-components.json
51 name: {{ include "common.fullname" .}}-expected-components
52 env:
53 - name: DCAE_NAMESPACE
54 value: {{ .Values.dcae_ns }}
55 - name: ONAP_NAMESPACE
56 value: {{ include "common.namespace" . }}
57 - name: HELM_RELEASE
58 value: {{ include "common.release" . }}
59 volumes:
60 - name: {{ include "common.fullname" . }}-expected-components
61 configMap:
62 name: {{ include "common.release" . }}-dcaemod-expected-components
63 imagePullSecrets:
64 - name: "{{ include "common.namespace" . }}-docker-registry-key"