Missing Licenses
[aaf/authz.git] / auth / helm / aaf / templates / aaf-service.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 ### AAF-SERVICE
22 ###
23 kind: Service
24 apiVersion: v1
25 metadata:
26   name: aaf-service
27 spec:
28   selector:
29     app: aaf-service
30   type: NodePort
31   ports:
32     - name: aaf-service
33       protocol: TCP
34       port: 8100
35       NodePort: 30080
36 ---
37 apiVersion: apps/v1
38 kind: Deployment
39 metadata:
40   name: aaf-service
41   labels:
42     app: aaf-service
43 spec:
44   replicas: 1
45   selector:
46     matchLabels:
47       app: aaf-service
48   template:
49     metadata:
50       labels:
51         app: aaf-service
52     spec:
53       volumes:
54       - name: {{ .Chart.Name }}-config-vol
55         persistentVolumeClaim:
56         claimName: {{ .Chart.Name }}-config-pvc
57       #- name: {{ .Chart.Name }}-config-vol
58       #  emptyDir: {}
59       initContainers:
60         - name: {{ .Chart.Name }}-config-container
61           image: {{ .Values.image.repository }}onap/aaf/aaf_config:{{ .Values.image.version }}
62           imagePullPolicy: IfNotPresent
63           volumeMounts:
64             - mountPath: "/opt/app/osaaf"
65               name: {{ .Chart.Name }}-config-vol
66           env:
67             - name: AAF_ENV
68               value: "{{ .Values.cadi.aaf_env }}"
69             - name: AAF_REGISTER_AS
70               value: "aaf-service"
71             - name: AAF_LOCATOR_AS
72               value: "{{ .Values.cadi.aaf_locate_as }}"
73             - name: LATITUDE
74               value: "{{ .Values.cadi.cadi_latitude }}"
75             - name: LONGITUDE
76               value: "{{ .Values.cadi.cadi_longitude }}"
77             - name: CASS_HOST
78               value: "aaf-cass"
79       containers:
80 ###
81 ### AAF-SERVICE
82 ###
83       - name: {{ .Chart.Name }}-service
84         image: {{ .Values.image.repository }}onap/aaf/aaf_service:{{ .Values.image.version }}
85         imagePullPolicy: IfNotPresent
86         command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_service","sleep","50", "cd /opt/app/aaf;bin/service"]
87         volumeMounts:
88           -  mountPath: "/opt/app/osaaf"
89              name: {{ .Chart.Name }}-config-vol
90         ports:
91         - name: service
92           protocol: TCP
93           containerPort: 8100