Update DCAE Startup Info
[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   type: NodePort
29   selector:
30     app: aaf-service
31   ports:
32     - name: {{.Values.services.service.fqdn}}
33       protocol: TCP
34       nodePort: {{.Values.services.service.public_port}}
35       port: {{.Values.services.service.internal_port}}
36 ---
37 apiVersion: apps/v1
38 kind: Deployment
39 metadata:
40   name: aaf-service
41   labels:
42     app: aaf-service
43 spec:
44   replicas: {{ .Values.services.service.replicas }}
45   selector:
46     matchLabels:
47       app: aaf-service
48   template:
49     metadata:
50       labels:
51         app: aaf-service
52     spec:
53       volumes:
54       - name: aaf-config-vol
55         persistentVolumeClaim:
56           claimName: aaf-config-pvc
57       - name: aaf-status-vol
58         persistentVolumeClaim:
59           claimName: aaf-status-pvc
60       initContainers:
61         - name: aaf-config-container
62           image: {{ .Values.image.repository }}onap/aaf/aaf_config:{{ .Values.image.version }}
63           imagePullPolicy: IfNotPresent
64           command: ["bash","/opt/app/aaf_config/bin/agent.sh"]
65           volumeMounts:
66             - mountPath: "/opt/app/osaaf"
67               name: aaf-config-vol
68             - mountPath: "/opt/app/aaf/status"
69               name: aaf-status-vol
70           env:
71             - name: aaf_env
72               value: "{{ .Values.services.aaf_env }}"
73             - name: aaf_id
74               value: "{{ .Values.services.aaf_id }}"
75             - name: aaf_locate_url
76               value: "https://aaf-locate.{{.Release.Namespace }}:{{.Values.services.locate.internal_port}}"
77             - name: aaf_locator_container
78               value: "helm"
79             - name: aaf_locator_container_ns
80               value: "{{ .Release.Namespace }}"
81             - name: aaf_locator_fqdn
82               value: "{{.Values.services.fqdn}}"
83             - name: aaf_locator_public_fqdn
84               value: "{{.Values.services.public_fqdn}}"
85             - name: cadi_latitude
86               value: "{{ .Values.services.cadi_latitude }}"
87             - name: cadi_longitude
88               value: "{{ .Values.services.cadi_longitude }}"
89             - name: cm_always_ignore_ips
90               value: "true"
91             - name: CASSANDRA_CLUSTER
92               value: "{{.Values.services.cass.fqdn}}.{{.Release.Namespace }}"
93 #            - name: CASSANDRA_USER
94 #              value: ""
95 #            - name: CASSANDRA_PASSWORD
96 #              value: ""
97 #           - name: CASSANDRA_PORT
98 #              value: ""
99 ###
100 ### AAF-SERVICE
101 ###
102       containers:
103       - name: aaf-service
104         image: {{ .Values.image.repository }}onap/aaf/aaf_core:{{ .Values.image.version }}
105         imagePullPolicy: IfNotPresent
106         command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-service nc aaf-cass.{{ .Release.Namespace }} {{ .Values.services.cass.native_trans_port }} aaf-cass && exec bin/service"]
107         volumeMounts:
108         -  mountPath: "/opt/app/osaaf"
109            name: aaf-config-vol
110         -  mountPath: "/opt/app/aaf/status"
111            name: aaf-status-vol
112         ports:
113         - name: service
114           protocol: TCP
115           containerPort: {{.Values.services.service.internal_port}}
116