9f0d35c32f432d1adbf7b38f0172c382c09dcee0
[aaf/authz.git] / auth / helm / aaf / templates / aaf-locate.yaml
1 ###
2 ### AAF-LOCATE
3 ###
4 kind: Service
5 apiVersion: v1
6 metadata:
7   name: aaf-locate
8 spec:
9   selector:
10     app: aaf-locate
11   type: NodePort
12   ports:
13     - name: aaf-locate
14       protocol: TCP
15       port: 8095
16       NodePort: 30081
17 ---
18 apiVersion: apps/v1
19 kind: Deployment
20 metadata:
21   name: aaf-locate
22   labels:
23     app: aaf-locate
24 spec:
25   replicas: 1
26   selector:
27     matchLabels:
28       app: aaf-locate
29   template:
30     metadata:
31       labels:
32         app: aaf-locate
33     spec:
34       volumes:
35         # Use this Pod Sharing dir to declare various States of starting
36       - name: {{ .Chart.Name }}-config-vol
37         emptyDir: {}
38       initContainers:
39         - name: {{ .Chart.Name }}-config-container
40           image: {{ .Values.image.repository }}onap/aaf/aaf_config:{{ .Values.image.version }}
41           imagePullPolicy: IfNotPresent
42           volumeMounts:
43             - mountPath: "/opt/app/osaaf"
44               name: {{ .Chart.Name }}-config-vol
45           env:
46             - name: AAF_ENV
47               value: "{{ .Values.cadi.aaf_env }}"
48             - name: AAF_REGISTER_AS
49               value: "aaf-locate"
50             - name: AAF_LOCATOR_AS
51               value: "{{ .Values.cadi.aaf_locate_as }}"
52             - name: LATITUDE
53               value: "{{ .Values.cadi.cadi_latitude }}"
54             - name: LONGITUDE
55               value: "{{ .Values.cadi.cadi_longitude }}"
56             - name: CASS_HOST
57               value: "aaf-cass"
58       containers:
59 ###
60 ### AAF-LOCATE
61 ###
62       - name: {{ .Chart.Name }}-locate
63         image: {{ .Values.image.repository }}onap/aaf/aaf_locate:{{ .Values.image.version }}
64         imagePullPolicy: IfNotPresent
65         command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_locate","sleep","50", "cd /opt/app/aaf;bin/locate"]
66         volumeMounts:
67           -  mountPath: "/opt/app/osaaf"
68              name: {{ .Chart.Name }}-config-vol
69         ports:
70         - name: aaf-locate
71           protocol: TCP
72           containerPort: 8095