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 echo "*** Move files from configmap to emptyDir"
35 cp -L /config-input-dats/* /config-dats/
36 echo "*** set righ user to the different folders"
37 chown -R 1000:1000 /config-dats
38 chown -R 1000:1000 /var/lib/cassandra
39 chown -R 1000:1000 /status
40 image: {{ include "repositoryGenerator.image.busybox" . }}
41 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
43 - mountPath: /var/lib/cassandra
45 - mountPath: /config-input-dats
46 name: config-cass-init-dats
47 - mountPath: /config-dats
48 name: config-cass-dats
59 - name: {{ include "common.name" . }}
60 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
61 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
62 # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well
63 command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"]
64 ports: {{ include "common.containerPorts" . | nindent 10 }}
66 - name: CASSANDRA_CLUSTER_NAME
67 value: {{ .Values.config.cluster_name }}
69 value: {{ .Values.config.dc }}
71 value: "/opt/cassandra/bin/cqlsh"
73 value: {{ .Values.config.heap_new_size }}
75 value: {{ .Values.config.max_heap_size }}
79 fieldPath: metadata.name
80 - name: MY_POD_NAMESPACE
83 fieldPath: metadata.namespace
87 fieldPath: status.podIP
89 - mountPath: /var/lib/cassandra
91 - mountPath: /etc/localtime
94 - mountPath: /opt/app/aaf/cass_init/dats
95 name: config-cass-dats
96 - mountPath: /opt/app/aaf/status
98 {{- if eq .Values.liveness.enabled true }}
102 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
103 periodSeconds: {{ .Values.liveness.periodSeconds }}
108 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
109 periodSeconds: {{ .Values.readiness.periodSeconds }}
110 resources: {{ include "common.resources" . | nindent 10 }}
111 {{- if .Values.nodeSelector }}
112 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
114 {{- if .Values.affinity }}
115 affinity: {{ toYaml .Values.affinity | nindent 10 }}
124 {{- if .Values.persistence.enabled }}
125 persistentVolumeClaim:
126 claimName: {{ include "common.fullname" . }}
130 - name: config-cass-init-dats
132 name: {{ include "common.fullname" . }}-cass-init-dats
133 - name: config-cass-dats
136 - name: "{{ include "common.namespace" . }}-docker-registry-key"