7404e4437074a5deb5515f8f50f7408e724bc418
[aaf/authz.git] / auth / helm / aaf / templates / aaf-cm.yaml
1 ###
2 ### AAF-CERTMAN
3 ###
4 kind: Service
5 apiVersion: v1
6 metadata:
7   name: aaf-cm
8 spec:
9   selector:
10     app: aaf-cm
11   type: NodePort
12   ports:
13     - name: aaf-cm
14       protocol: TCP
15       port: 8150
16       NodePort: 30084
17 ---
18 apiVersion: apps/v1
19 kind: Deployment
20 metadata:
21   name: aaf-cm
22   labels:
23     app: aaf-cm
24 spec:
25   replicas: 1
26   selector:
27     matchLabels:
28       app: aaf-cm
29   template:
30     metadata:
31       labels:
32         app: aaf-cm
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-cm"
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-CERTMAN
61 ###
62       - name: {{ .Chart.Name }}-cm
63         image: {{ .Values.image.repository }}onap/aaf/aaf_cm:{{ .Values.image.version }}
64         imagePullPolicy: IfNotPresent
65         command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_cm","sleep","45", "cd /opt/app/aaf;bin/cm"]
66         volumeMounts:
67           -  mountPath: "/opt/app/osaaf"
68              name: {{ .Chart.Name }}-config-vol
69         ports:
70         - name: aaf-cm
71           protocol: TCP
72           containerPort: 8150