Make OOM workable with Dublin
[aaf/authz.git] / auth / helm / aaf / templates / aaf-gui.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-GUI
22 ###
23 kind: Service
24 apiVersion: v1
25 metadata:
26   name: aaf-gui
27 spec:
28   selector:
29     app: aaf-gui
30   type: NodePort
31   ports:
32     - name: {{.Values.services.gui.fqdn}}
33       protocol: TCP
34       nodePort: 30083
35       port: {{.Values.services.gui.internal_port}}
36       targetPort: {{.Values.services.gui.internal_port}}
37 ---
38 apiVersion: apps/v1
39 kind: Deployment
40 metadata:
41   name: aaf-gui
42   labels:
43     app: aaf-gui
44 spec:
45   replicas: {{ .Values.services.gui.replicas }}
46   selector:
47     matchLabels:
48       app: aaf-gui
49   template:
50     metadata:
51       labels:
52         app: aaf-gui
53     spec:
54       volumes:
55         # Use this Pod Sharing dir to declare various States of starting
56       - name: aaf-config-vol
57         persistentVolumeClaim:
58           claimName: aaf-config-pvc
59       - name: aaf-status-vol
60         persistentVolumeClaim:
61           claimName: aaf-status-pvc
62       initContainers:
63         - name: aaf-config-container
64           image: {{ .Values.image.repository }}onap/aaf/aaf_config:{{ .Values.image.version }}
65           imagePullPolicy: IfNotPresent
66           command: ["bash","/opt/app/aaf_config/bin/agent.sh"]
67           volumeMounts:
68             - mountPath: "/opt/app/osaaf"
69               name: aaf-config-vol
70           env:
71             - name: AAF_ENV
72               value: "{{ .Values.services.aaf_env }}"
73             - name: LATITUDE
74               value: "{{ .Values.services.cadi_latitude }}"
75             - name: LONGITUDE
76               value: "{{ .Values.services.cadi_longitude }}"
77             - name: aaf_locator_container
78               value: "helm"
79             - name: aaf_locator_container_ns
80               valueFrom:
81                 fieldRef:
82                   fieldPath: metadata.namespace
83             - name: aaf_locate_url
84               value: "https://aaf-locate.{{.Release.Namespace }}:{{.Values.services.locate.internal_port}}"
85             - name: aaf_locator_public_fqdn
86               value: "{{.Values.services.public_fqdn}}"
87             - name: aaf_locator_name
88               value: "{{.Values.services.aaf_locator_name}}"
89             - name: aaf_locator_name_helm
90               value: "{{.Values.services.aaf_locator_name_helm}}"
91             - name: CASSANDRA_CLUSTER
92               value: "{{.Values.services.cass.fqdn}}.{{.Values.services.ns}}"
93 #            - name: CASSANDRA_USER
94 #              value: ""
95 #            - name: CASSANDRA_PASSWORD
96 #              value: ""
97 #           - name: CASSANDRA_PORT
98 #              value: ""
99       containers:
100 ###
101 ### AAF-GUI
102 ###
103       - name: aaf-gui
104         image: {{ .Values.image.repository }}onap/aaf/aaf_gui:{{ .Values.image.version }}
105         imagePullPolicy: IfNotPresent
106         command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-gui aaf-locate && exec bin/gui"]
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: {{.Values.services.gui.fqdn}}
114           protocol: TCP
115           containerPort: {{.Values.services.gui.internal_port}}