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 "*** input data ***"
35 ls -l /config-input-data/*
36 echo "*** input dats ***"
37 ls -l /config-input-dats/*
38 cp -L /config-input-data/* /config-data/
39 cp -L /config-input-dats/* /config-dats/
40 echo "*** output data ***"
42 echo "*** output dats ***"
44 chown -R 1000:1000 /config-data
45 chown -R 1000:1000 /config-dats
46 chown -R 1000:1000 /var/lib/cassandra
47 chown -R 1000:1000 /status
48 image: {{ include "repositoryGenerator.image.busybox" . }}
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 - mountPath: /var/lib/cassandra
53 - mountPath: /config-input-data
54 name: config-cass-init-data
55 - mountPath: /config-input-dats
56 name: config-cass-init-dats
57 - mountPath: /config-dats
58 name: config-cass-dats
59 - mountPath: /config-data
60 name: config-cass-data
71 - name: {{ include "common.name" . }}
72 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
73 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
74 # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well
75 command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"]
76 ports: {{ include "common.containerPorts" . | nindent 10 }}
78 - name: CASSANDRA_CLUSTER_NAME
79 value: {{ .Values.config.cluster_name }}
81 value: {{ .Values.config.dc }}
83 value: "/opt/cassandra/bin/cqlsh"
85 value: {{ .Values.config.heap_new_size }}
87 value: {{ .Values.config.max_heap_size }}
91 fieldPath: metadata.name
92 - name: MY_POD_NAMESPACE
95 fieldPath: metadata.namespace
99 fieldPath: status.podIP
101 - mountPath: /var/lib/cassandra
103 - mountPath: /etc/localtime
106 - mountPath: /opt/app/aaf/cass_init/data
107 name: config-cass-data
108 - mountPath: /opt/app/aaf/cass_init/dats
109 name: config-cass-dats
110 - mountPath: /opt/app/aaf/status
112 {{- if eq .Values.liveness.enabled true }}
116 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
117 periodSeconds: {{ .Values.liveness.periodSeconds }}
122 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
123 periodSeconds: {{ .Values.readiness.periodSeconds }}
124 resources: {{ include "common.resources" . | nindent 10 }}
125 {{- if .Values.nodeSelector }}
126 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
128 {{- if .Values.affinity }}
129 affinity: {{ toYaml .Values.affinity | nindent 10 }}
138 {{- if .Values.persistence.enabled }}
139 persistentVolumeClaim:
140 claimName: {{ include "common.fullname" . }}
144 - name: config-cass-init-dats
146 name: {{ include "common.fullname" . }}-cass-init-dats
147 - name: config-cass-init-data
149 name: {{ include "common.fullname" . }}-cass-init-data
150 - name: config-cass-dats
152 - name: config-cass-data
155 - name: "{{ include "common.namespace" . }}-docker-registry-key"