[CASSANDRA] Change values to makre Cassandra instances more stable
[oom.git] / kubernetes / dcaegen2 / components / dcae-healthcheck / templates / deployment.yaml
1 {{/*
2 #============LICENSE_START========================================================
3 # ================================================================================
4 # Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.
5 # Modifications Copyright © 2018 Amdocs, Bell Canada
6 # ================================================================================
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=========================================================
19 */}}
20
21 apiVersion: apps/v1
22 kind: Deployment
23 metadata:
24   name: {{ include "common.fullname" . }}
25   namespace: {{ include "common.namespace" . }}
26   labels:
27     app: {{ include "common.name" . }}
28     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
29     release: {{ include "common.release" . }}
30     heritage: {{ .Release.Service }}
31 spec:
32   replicas: 1
33   selector:
34     matchLabels:
35       app: {{ include "common.name" . }}
36   template:
37     metadata:
38       labels:
39         app: {{ include "common.name" . }}
40         release: {{ include "common.release" . }}
41     spec:
42       containers:
43         - name: {{ include "common.name" . }}
44           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
45           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
46           resources:
47 {{ include "common.resources" . | indent 12 }}
48           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 }}
64           volumeMounts:
65             - mountPath: /opt/app/expected-components.json
66               subPath: expected-components.json
67               name: {{ include "common.fullname" .}}-expected-components
68           env:
69             - name: DCAE_NAMESPACE
70               value: {{ .Values.dcae_ns }}
71             - name: ONAP_NAMESPACE
72               value: {{ include "common.namespace" . }}
73             - name: HELM_RELEASE
74               value: {{ include "common.release" . }}
75             - name: DEPLOY_LABEL
76               value: cfydeployment
77       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
78       volumes:
79         - name: {{ include "common.fullname" . }}-expected-components
80           configMap:
81             name: {{ include "common.release" . }}-dcae-expected-components
82       imagePullSecrets:
83       - name: "{{ include "common.namespace" . }}-docker-registry-key"