1 # Copyright © 2017 Amdocs, Bell Canada
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 apiVersion: extensions/v1beta1
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ include "common.release" . }}
24 heritage: {{ .Release.Service }}
26 replicas: {{ .Values.global.aaf.cass.replicas }}
30 app: {{ include "common.name" . }}
31 release: {{ include "common.release" . }}
34 - name: fix-permission
40 chmod -R 775 /opt/app/aaf/status
41 chown -R 1000:1000 /opt/app/aaf/status
42 chmod -R 775 /var/lib/cassandra
43 chown -R 1000:1000 /var/lib/cassandra
44 image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
45 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 - mountPath: /opt/app/aaf/status
49 - mountPath: /var/lib/cassandra
52 - name: {{ include "common.name" . }}
53 image: {{ .Values.global.repository }}/{{.Values.global.aaf.cass.image}}
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
55 # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well
56 command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"]
60 command: ["/bin/sh","-c","rm /opt/app/aaf/status/aaf-cass"]
63 containerPort: {{.Values.global.aaf.cass.storage_port}}
65 containerPort: {{.Values.global.aaf.cass.ssl_storage_port}}
67 containerPort: {{.Values.global.aaf.cass.native_trans_port}}
69 containerPort: {{.Values.global.aaf.cass.rpc_port}}
71 - name: CASSANDRA_CLUSTER_NAME
72 value: {{.Values.global.aaf.cass.cluster_name}}
74 value: {{.Values.global.aaf.cass.dc}}
76 value: "/opt/cassandra/bin/cqlsh"
78 value: {{.Values.global.aaf.cass.heap_new_size}}
80 value: {{.Values.global.aaf.cass.max_heap_size}}
84 fieldPath: metadata.name
85 - name: MY_POD_NAMESPACE
88 fieldPath: metadata.namespace
92 fieldPath: status.podIP
94 - mountPath: /var/lib/cassandra
96 - mountPath: /opt/app/aaf/status
98 - mountPath: /etc/localtime
101 {{- if eq .Values.liveness.enabled true }}
104 port: {{.Values.global.aaf.cass.native_trans_port}}
105 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
106 periodSeconds: {{ .Values.liveness.periodSeconds }}
110 port: {{.Values.global.aaf.cass.native_trans_port}}
111 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
112 periodSeconds: {{ .Values.readiness.periodSeconds }}
114 {{ include "common.resources" . | indent 10 }}
115 {{- if .Values.nodeSelector }}
117 {{ toYaml .Values.nodeSelector | indent 10 }}
119 {{- if .Values.affinity }}
121 {{ toYaml .Values.affinity | indent 10 }}
127 - name: aaf-status-vol
128 persistentVolumeClaim:
129 claimName: {{ include "common.release" . }}-aaf-status
131 {{- if .Values.persistence.enabled }}
132 persistentVolumeClaim:
133 claimName: {{ include "common.fullname" . }}-data
138 - name: "{{ include "common.namespace" . }}-docker-registry-key"