2 # Copyright © 2017 Amdocs, Bell Canada
3 # Modifications © 2020 Orange
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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
20 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
22 selector: {{- include "common.selectors" . | nindent 4 }}
23 replicas: {{ .Values.replicaCount }}
25 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
28 - name: fix-permission
34 chown -R 1000:1000 /opt/app/aaf/status
35 chown -R 1000:1000 /var/lib/cassandra
36 image: {{ include "repositoryGenerator.image.busybox" . }}
37 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
39 - mountPath: /var/lib/cassandra
49 - name: {{ include "common.name" . }}
50 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well
53 command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"]
54 ports: {{ include "common.containerPorts" . | nindent 10 }}
56 - name: CASSANDRA_CLUSTER_NAME
57 value: {{ .Values.config.cluster_name }}
59 value: {{ .Values.config.dc }}
61 value: "/opt/cassandra/bin/cqlsh"
63 value: {{ .Values.config.heap_new_size }}
65 value: {{ .Values.config.max_heap_size }}
69 fieldPath: metadata.name
70 - name: MY_POD_NAMESPACE
73 fieldPath: metadata.namespace
77 fieldPath: status.podIP
79 - mountPath: /var/lib/cassandra
81 - mountPath: /etc/localtime
84 - mountPath: /opt/app/aaf/cass_init/data
85 name: config-cass-init-data
86 - mountPath: /opt/app/aaf/cass_init/dats
87 name: config-cass-init-dats
88 {{- if eq .Values.liveness.enabled true }}
92 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
93 periodSeconds: {{ .Values.liveness.periodSeconds }}
98 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
99 periodSeconds: {{ .Values.readiness.periodSeconds }}
100 resources: {{ include "common.resources" . | nindent 10 }}
101 {{- if .Values.nodeSelector }}
102 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
104 {{- if .Values.affinity }}
105 affinity: {{ toYaml .Values.affinity | nindent 10 }}
112 {{- if .Values.persistence.enabled }}
113 persistentVolumeClaim:
114 claimName: {{ include "common.fullname" . }}
118 - name: config-cass-init-dats
120 name: {{ include "common.fullname" . }}-cass-init-dats
121 - name: config-cass-init-data
123 name: {{ include "common.fullname" . }}-cass-init-data
125 - name: "{{ include "common.namespace" . }}-docker-registry-key"