blob: 3abdcb3c7f4e3651e0a0aaf90399334d8649c3f8 [file] [log] [blame]
kj52dfb132018-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 }}
kj52dfb132018-03-27 15:50:39 +030027 template:
28 metadata:
29 labels:
30 app: {{ include "common.name" . }}
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000031 release: {{ .Release.Name }}
kj52dfb132018-03-27 15:50:39 +030032 spec:
kj52dfb132018-03-27 15:50:39 +030033 containers:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000034 - name: {{ include "common.name" . }}
Kiran Kamineni39648722018-03-21 14:58:11 -070035 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
kj52dfb132018-03-27 15:50:39 +030036 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000037 command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"]
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000038 ports:
39 - containerPort: {{ .Values.service.externalPort }}
40 - containerPort: {{ .Values.service.externalPort2 }}
41 - containerPort: {{ .Values.service.externalPort3 }}
42 - containerPort: {{ .Values.service.externalPort4 }}
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000043 env:
44 - name: CASSANDRA_CLUSTER_NAME
45 value: "osaaf"
46 - name: CASSANDRA_DC
47 value: "dc1"
48 - name: HEAP_NEWSIZE
49 value: "512M"
50 - name: MAX_HEAP_SIZE
51 value: "1024M"
kj52dfb132018-03-27 15:50:39 +030052 volumeMounts:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000053 - mountPath: /var/lib/cassandra
54 name: cassandra-storage
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000055 - mountPath: /etc/localtime
56 name: localtime
57 readOnly: true
kj52dfb132018-03-27 15:50:39 +030058 {{- if eq .Values.liveness.enabled true }}
59 livenessProbe:
60 tcpSocket:
Mahendra Raghuwanshiafb1e2a2018-05-03 12:15:03 +000061 port: {{ .Values.service.internalPort3 }}
kj52dfb132018-03-27 15:50:39 +030062 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
63 periodSeconds: {{ .Values.liveness.periodSeconds }}
64 {{ end -}}
65 readinessProbe:
Mike Elliotta91e2bf2018-10-15 11:43:53 -040066 tcpSocket:
67 port: {{ .Values.service.internalPort3 }}
kj52dfb132018-03-27 15:50:39 +030068 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
69 periodSeconds: {{ .Values.readiness.periodSeconds }}
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000070 resources:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000071{{ include "common.resources" . | indent 10 }}
kj52dfb132018-03-27 15:50:39 +030072 {{- if .Values.nodeSelector }}
73 nodeSelector:
74{{ toYaml .Values.nodeSelector | indent 10 }}
75 {{- end -}}
76 {{- if .Values.affinity }}
77 affinity:
78{{ toYaml .Values.affinity | indent 10 }}
79 {{- end }}
kj52dfb132018-03-27 15:50:39 +030080 volumes:
Mandeep Khinda6dcc80d2018-10-09 14:47:35 +000081 - name: localtime
82 hostPath:
83 path: /etc/localtime
84 - name: cassandra-storage
85 {{- if .Values.persistence.enabled }}
86 persistentVolumeClaim:
87 claimName: {{ include "common.fullname" . }}
88 {{- else }}
89 emptyDir: {}
90 {{- end }}
kj52dfb132018-03-27 15:50:39 +030091 imagePullSecrets:
Instrumental378109d2018-10-16 20:40:41 -050092 - name: "{{ include "common.namespace" . }}-docker-registry-key"