e8d91e2c92525f9a8d38fb65b45abb7070c3ce51
[aaf/authz.git] / auth / helm / aaf / templates / aaf-cass.yaml
1 kind: Service
2 apiVersion: v1
3 metadata:
4   name: aaf-cass
5 spec:
6   selector:
7     app: aaf-cass
8   ports:
9     - name: storage
10       protocol: TCP
11       port: 7000
12       containerPort: 7000
13     - name: ssl-storage
14       protocol: TCP
15       port: 7001
16       containerPort: 7001
17     - name: native-trans
18       protocol: TCP
19       port: 9042
20       containerPort: 9042
21 ---
22 apiVersion: apps/v1
23 kind: Deployment
24 metadata:
25   name: aaf-cass
26   labels:
27     app: aaf-cass
28 spec:
29   replicas: 1
30   selector:
31     matchLabels:
32       app: aaf-cass
33   template:
34     metadata:
35       labels:
36         app: aaf-cass
37     spec:
38       volumes:
39       - name: {{ .Chart.Name }}-cass-vol
40         persistentVolumeClaim:
41           claimName: {{ .Chart.Name }}-cass-pvc
42       containers:
43 ###
44 ### AAF-CASS
45 ###
46       - name: {{ .Chart.Name }}-cass
47         image: {{ .Values.image.repository }}onap/aaf/aaf_cass:{{ .Values.image.version }}
48         imagePullPolicy: IfNotPresent
49         # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well
50         command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"]
51         volumeMounts:
52           - mountPath: "/var/lib/cassandra"
53             name: {{ .Chart.Name }}-cass-vol
54         ports:
55         - name: storage
56           containerPort: 7000
57         - name: ssl-storage
58           containerPort: 7001
59         - name: native-trans
60           containerPort: 9042
61         - name: rpc
62           containerPort: 9160
63         env:
64         - name: CASSANDRA_CLUSTER_NAME
65           value: "osaaf"
66         - name: CASSANDRA_DC
67           value: "dc1"
68         - name: HEAP_NEWSIZE
69           value: "512M"
70         - name: MAX_HEAP_SIZE
71           value: "1024M"