896ff35dc99f2db67a812133bab8245c50bbb579
[aaf/authz.git] / auth / helm / aaf-hello / templates / aaf-hello.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-HELLO
22 ###
23 kind: Service
24 apiVersion: v1
25 metadata:
26   name: aaf-hello
27 spec:
28   selector:
29     app: aaf-hello
30   type: NodePort
31   ports:
32     - name: aaf-hello
33       protocol: TCP
34       port: {{.Values.cadi.port}}
35       nodePort: {{ .Values.cadi.public_port}}
36 ---
37 apiVersion: apps/v1
38 kind: Deployment
39 metadata:
40   name: aaf-hello
41   labels:
42     app: aaf-hello
43 spec:
44   replicas: {{ .Values.replicas.hello }}
45   selector:
46     matchLabels:
47       app: aaf-hello
48   template:
49     metadata:
50       labels:
51         app: aaf-hello
52     spec:
53       volumes:
54         # Use this Pod Sharing dir to declare various States of starting
55       - name: aaf-hello-vol
56         emptyDir: {}
57       initContainers:
58         - name: aaf-hello-config
59           image: {{ .Values.image.repository }}onap/aaf/aaf_agent:{{ .Values.image.version }}
60           imagePullPolicy: IfNotPresent
61           volumeMounts:
62             - mountPath: "/opt/app/osaaf/local"
63               name: aaf-hello-vol
64           command: ["bash","-c","cd /opt/app/osaaf/local && /opt/app/aaf_config/bin/agent.sh place aaf@aaf.osaaf.org aaf-hello "]
65           env:
66             - name: aaf_env
67               value: "{{ .Values.cadi.aaf_env }}"
68             - name: cadi_latitude
69               value: "{{ .Values.cadi.cadi_latitude }}"
70             - name: cadi_longitude
71               value: "{{ .Values.cadi.cadi_longitude }}"
72             - name: aaf_locator_container
73               value: "helm"
74             - name: aaf_locator_container_ns
75               value: "{{ .Release.Namespace }}"
76             - name: aaf_locate_url
77               value: "https://aaf-locate.{{ .Release.Namespace }}:8095"
78             - name: aaf_locator_app_ns
79               value: "org.osaaf.aaf"
80             - name: "APP_FQDN"
81               value: "{{ .Values.cadi.fqdn }}"
82             - name: "APP_FQI"
83               value: "{{ .Values.cadi.fqi }}"
84             - name: "DEPLOY_FQI"
85               value: "deployer@people.osaaf.org"
86             - name: "DEPLOY_PASSWORD"
87               value: "demo123456!"
88 # Hello specific.  Clients don't necessarily need this
89             - name: aaf_locator_public_fqdn
90               value: "{{.Values.cadi.public_fqdn}}"
91             - name: aaf_locator_name
92               value: "{{.Values.cadi.aaf_locator_name}}"
93             - name: aaf_locator_name_helm
94               value: "{{.Values.cadi.aaf_locator_name_helm}}"
95             - name: aaf_locator_fqdn_helm
96               value: "%N.%CNS"
97
98 ###
99 ### AAF-HELLO
100 ###
101       containers:
102       - name: aaf-hello
103         image: {{ .Values.image.repository }}onap/aaf/aaf_hello:{{ .Values.image.version }}
104         imagePullPolicy: IfNotPresent
105         command: ["/bin/bash","-c","cd /opt/app/aaf && sleep 240 && exec bin/hello"]
106         volumeMounts:
107         -  mountPath: "/opt/app/osaaf/local"
108            name: aaf-hello-vol
109         ports:
110         - name: aaf-hello
111           protocol: TCP
112           containerPort: 8130