Batch, Remove unneeded Classes, refine, etc
[aaf/authz.git] / auth / helm / aaf / templates / aaf-cass.yaml
1 #########
2 ##  ============LICENSE_START====================================================
3 ##  org.onap.aaf
4 ##  ===========================================================================
5 ##  Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
6 ##  ===========================================================================
7 ##  Licensed under the Apache License, Version 2.0 (the "License");
8 ##  you may not use this file except in compliance with the License.
9 ##  You may obtain a copy of the License at
10 ##
11 ##       http://www.apache.org/licenses/LICENSE-2.0
12 ##
13 ##  Unless required by applicable law or agreed to in writing, software
14 ##  distributed under the License is distributed on an "AS IS" BASIS,
15 ##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 ##  See the License for the specific language governing permissions and
17 ##  limitations under the License.
18 ##  ============LICENSE_END====================================================
19 ##
20
21 kind: Service
22 apiVersion: v1
23 metadata:
24   name: aaf-cass
25   labels:
26     app: aaf-cass
27 spec:
28   selector:
29     app: aaf-cass
30   ports:
31     - name: storage
32       protocol: TCP
33       port: 7000
34       containerPort: 7000
35     - name: ssl-storage
36       protocol: TCP
37       port: 7001
38       containerPort: 7001
39     - name: native-trans
40       protocol: TCP
41       port: 9042
42       containerPort: 9042
43 ---
44 apiVersion: apps/v1
45 kind: Deployment
46 metadata:
47   name: aaf-cass
48   labels:
49     app: aaf-cass
50 spec:
51   replicas: {{ .Values.replicas.cass }}
52   selector:
53     matchLabels:
54       app: aaf-cass
55   template:
56     metadata:
57       labels:
58         app: aaf-cass
59     spec:
60       volumes:
61       - name: {{ .Chart.Name }}-cass-vol
62         persistentVolumeClaim:
63           claimName: {{ .Chart.Name }}-cass-pvc
64       - name: {{ .Chart.Name }}-status-vol
65         persistentVolumeClaim:
66           claimName: {{ .Chart.Name }}-status-pvc
67       containers:
68 ###
69 ### AAF-CASS
70 ###
71       - name: {{ .Chart.Name }}-cass
72         image: {{ .Values.image.repository }}onap/aaf/aaf_cass:{{ .Values.image.version }}
73         imagePullPolicy: IfNotPresent
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         volumeMounts:
77         - mountPath: "/var/lib/cassandra"
78           name: {{ .Chart.Name }}-cass-vol
79         - mountPath: "/opt/app/aaf/status"
80           name: {{ .Chart.Name }}-status-vol
81         ports:
82         - name: storage
83           containerPort: 7000
84         - name: ssl-storage
85           containerPort: 7001
86         - name: native-trans
87           containerPort: 9042
88         - name: rpc
89           containerPort: 9160
90         env:
91         - name: CASSANDRA_CLUSTER_NAME
92           value: "osaaf"
93         - name: CASSANDRA_DC
94           value: "dc1"
95         - name: HEAP_NEWSIZE
96           value: "512M"
97         - name: MAX_HEAP_SIZE
98           value: "1024M"
99         - name: MY_POD_NAME
100           valueFrom:
101             fieldRef:
102               fieldPath: metadata.name
103         - name: MY_POD_NAMESPACE
104           valueFrom:
105             fieldRef:
106               fieldPath: metadata.namespace
107         - name: MY_POD_IP
108           valueFrom:
109             fieldRef:
110               fieldPath: status.podIP